← All fixes
PowerShell: running scripts is disabled on this system (npm, npx, venv Activate.ps1)
#136Error
File C:\...\npm.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies. (also Activate.ps1 for Python venv)
Why it happens, and why this works
Windows PowerShell defaults to the Restricted execution policy, which blocks every .ps1 file, and npm/npx/venv install .ps1 wrappers that PowerShell prefers over the .cmd ones. RemoteSigned for the current user lets local scripts run while still requiring a signature on scripts downloaded from the internet.
Fix
Allow locally created scripts for your user only, no admin needed. 1. In PowerShell run: Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned 2. Answer Y if asked, then open a NEW PowerShell window and rerun the command. 3. If you can't change policy (locked-down machine), call the .cmd shim instead: npm.cmd install, npx.cmd ..., or for a venv run .venv\Scripts\activate.bat from cmd. Don't use -ExecutionPolicy Unrestricted or Bypass machine-wide.
Did it work?
No reports yet0 worked0 didn't
Known good on: windows@10, powershell@5.1
Tried it yourself?
Related fixes
npm error Missing script: "dev"
#83npm error Missing script: "dev" npm error To see a list of scripts, run: npm error npm run
FileNotFoundError for a file next to the script (path is relative to the current folder)
#79FileNotFoundError: [Errno 2] No such file or directory: 'data/config.json'
pythonVerifiedNo reports yet
GH001: Large files detected, file exceeds GitHub's file size limit of 100.00 MB
#109remote: error: File data/model.bin is 120.00 MB; this exceeds GitHub's file size limit of 100.00 MB remote: error: GH001: Large files detected. You may want to try Git Large File Storage