npm i -g firebase-tools leads to …firebase.ps1 cannot be loaded because running scripts is disabled on this system

less than 1 minute read

The error is due to Windows blocking access to run the firebase.ps1 powershell scripts. You can try the below commands to solve the issue,


Solution 1:
Set-ExecutionPolicy RemoteSigned

For current users,
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser

Solution 2:
npm cache clean --force

Solution 3:
You can delete this file and try again.

RemoteSigned: This requires that all scripts and configuration files downloaded from the Internet are signed by a trusted publisher. The default execution policy for Windows server computers.

Leave a comment