{"id":199,"hash":"80875798d3d955da31d710e455ab78b321cea6691260715c01745fbf5c2e014e","pattern":"VSC PowerShell. After npm updating packages .ps1 cannot be loaded because running scripts is disabled on this system","full_message":"I design websites in VSC and PowerShell is my default terminal.\n\nAfter updating and deploying a website to firebase earlier, I was prompted to update firebase tools - which I did using npm. Immediately after I cannot run/access any firebase scripts wthout the folllowing error:\n\nfirebase : File C:\\Users\\mada7\\AppData\\Roaming\\npm\\firebase.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170. At line:1 char:1\n\nfirebase\n  + CategoryInfo          : SecurityError: (:) [], PSSecurityException\n  + FullyQualifiedErrorId : UnauthorizedAccess\n\nI've spent a few hours searching around and can't find a solid answer the problem. Many threads are several years old and I find it bizarre I've not had this problem in the past year until today.\nI can still access firebase scripts if I set my default terminal to cmd.\n\nAssuming the problem was related to firebase-tools I've carried on working but have now updated vue.js and get the error again when trying to run any vue commands in powershell:\n\nvue : File C:\\Users\\mada7\\AppData\\Roaming\\npm\\vue.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170. At line:1 char:1\n\nvue\n  + CategoryInfo          : SecurityError: (:) [], PSSecurityException\n  + FullyQualifiedErrorId : UnauthorizedAccess\n\nVSCode Version:\nVersion: 1.37.1 (user setup)\nCommit: f06011a\nDate: 2019-08-15T16:17:55.855Z\nElectron: 4.2.7\nChrome: 69.0.3497.128\nNode.js: 10.11.0\nV8: 6.9.427.31-electron.0\nOS: Windows_NT x64 10.0.18362\nOS Version:\nWindows 10 Home\nVersion - 1903\nOS build - 18362.295\n\nI've been reading around and seen many threads around permissions for scripts, but I haven't changed any - indeed the PowerShell scripts worked right up until I updated my packages. No other settings touched in the mean time. I don't want to be changing PowerShell settings unnecessarily.","ecosystem":"npm","package_name":"firebase","package_version":null,"solution":"This is a powershell security policy, to fix it, run Powershell as administrator and run the following\n\nPS C:\\> Set-ExecutionPolicy RemoteSigned \n\nIf you don't want to run the command as an administrator but just for the current user, you can add a scope like below\n\nPS C:\\> Set-ExecutionPolicy RemoteSigned -Scope CurrentUser\n\nThe stricter the policy, the more secure your system becomes.\n\nYou can change RemoteSigned to other options like: Restricted, AllSigned, RemoteSigned, Unrestricted\n\nSource: https://tecadmin.net/powershell-running-scripts-is-disabled-system/\n\nAlternatively you can modify C:\\Program Files\\PowerShell\\7\\powershell.config.json using a text editor and add or modify the following section.\n\n{\n   ....\n\n   \"Microsoft.PowerShell:ExecutionPolicy\":  \"RemoteSigned\"\n}\n\nYou can also run your script without modifying security policies by using the command prompt as noted by ztom's answer here.","confidence":0.95,"source":"stackoverflow","source_url":"https://stackoverflow.com/questions/57673913/vsc-powershell-after-npm-updating-packages-ps1-cannot-be-loaded-because-runnin","votes":247,"created_at":"2026-04-19T04:41:31.370032+00:00","updated_at":"2026-04-19T04:51:13.115144+00:00"}