Skip to content

[Issue]: Running scripts disabled error #1301

@Richienb

Description

@Richienb

What happened?

nvm use 24, then try running npm.

Got error - see console output

What did you expect to happen?

Should have immediately worked

Version

1.1.12

Which version of Windows?

Windows 11+ (Default)

Which locale?

English (Default)

Which shell are you running NVM4W in?

PowerShell

User Permissions?

Administrative Privileges, Elevated

Is Developer Mode enabled?

None

Relevant log/console output

PS C:\Users\richi\Documents\ccai> npm
npm : File C:\Program Files (x86)\nodejs\npm.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
+ npm
+ ~~~
    + CategoryInfo          : SecurityError: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess

Debug Output

richi is not using admin or elevated rights.

Windows PowerShell
Windows Version: 10.0 (Build 26100)

Windows Developer Mode: UNKNOWN (user cannot read registry)

NVM4W Version:      1.1.12
NVM4W Path:         C:\Users\richi\AppData\Roaming\nvm\nvm.exe
NVM4W Settings:     C:\Users\richi\AppData\Roaming\nvm\settings.txt
NVM_HOME:           C:\Users\richi\AppData\Roaming\nvm
NVM_SYMLINK:        C:\Program Files (x86)\nodejs
Node Installations: C:\Users\richi\AppData\Roaming\nvm

Total Node.js Versions: 1
Active Node.js Version: v24.9.0

IPv6 is enabled. This can slow downloads significantly.

No problems detected.

Find help at https://github.com/coreybutler/nvm-windows/wiki/Common-Issues

Anything else?

Fixed by running Set-ExecutionPolicy -ExecutionPolicy Unrestricted in an admin powershell

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions