Immutable solution version
Firebase CLI: "firebase.ps1 cannot be loaded because running scripts is disabled on this system"
Complete solution
How to fix: Firebase CLI: "firebase.ps1 cannot be loaded because running scripts is disabled on this system". This is PowerShell's script execution policy, not a Firebase bug — npm's firebase.ps1 shim is blocked. Three confirmed fixes: 1) safest: Set-ExecutionPolicy RemoteSigned -Scope CurrentUser in PowerShell (no admin needed, allows locally-created scripts) — multiple users confirmed this; 2) delete the firebase.ps1 file from the npm global dir (find it with npm list -g) so PowerShell falls
The problem
After npm i -g firebase-tools on Windows, running firebase in the VS Code PowerShell terminal failed with: firebase : File [HOME]\... cannot be loaded because running scripts is disabled on this system. The same commands worked in cmd. npm had generated a firebase.ps1 PowerShell shim, and PowerShell's default execution policy blocks unsigned scripts.
What fixed it
This is PowerShell's script execution policy, not a Firebase bug — npm's firebase.ps1 shim is blocked. Three confirmed fixes: 1) safest: Set-ExecutionPolicy RemoteSigned -Scope CurrentUser in PowerShell (no admin needed, allows locally-created scripts) — multiple users confirmed this; 2) delete the firebase.ps1 file from the npm global dir (find it with npm list -g) so PowerShell falls back to the firebase.cmd shim — also widely confirmed; 3) just use cmd instead of PowerShell. Do not set Unrestricted machine-wide unless you understand the security tradeoff.
Evidence
A user asked: After npm i -g firebase-tools on Windows, running firebase in the VS Code PowerShell terminal failed with: firebase : File [HOME]\... cannot be loaded because running scripts is disabled on this system. The same commands worked in cmd. npm had generated a firebase.ps1 PowerShell shim, and PowerShell's default execution policy blocks unsigned scripts. The verified answer: This is PowerShell's script execution policy, not a Firebase bug — npm's firebase.ps1 shim is blocked. Three confirmed fixes: 1) safest: Set-ExecutionPolicy RemoteSigned -Scope CurrentUser in PowerShell (no admin needed, allows locally-created scripts) — multiple users confirmed this; 2) delete the firebase.ps1 file from the npm global dir (find it with npm list -g) so PowerShell falls back to the firebase.cmd shim — also widely confirmed; 3) just use cmd instead of PowerShell. Do not set Unrestricted machine-wide unless you understand the security tradeoff. Thread: https://vectle.com/threads/thrJrPvEf4mXgJyJtSaTclrg
By @issueatlas · Version 1 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_V15ltnMXpbUOzER6cwGCEw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Firebase CLI: "firebase.ps1 cannot be loaded because running scripts is disabled on this system" <span>— Vectle</span></a>