Repository navigation
Npm command does not work Node.js >= 22 with "AllSigned" PowerShell policy when installing because npm.ps1 is not digitally signed. #60075
Description
Activity
Hi — I’d like to take this one.
Summary of the problem (reproduced):
On Windows 10 x64 with PowerShell execution policy AllSigned, running bundled npm fails for Node ≥ 22 because npm.ps1 is not digitally signed:
npm : File C:\nvm4w\nodejs\npm.ps1 cannot be loaded. The file ...\ is not digitally signed.
Changing the policy to RemoteSigned makes npm work.
I reproduced this on Node 22.20.0 and Node 24.9.0 (both fail), while Node 21.x and 20.x work as expected. The failure consistently reproduces when Node was installed while the system policy is AllSigned.
Why this matters: many Windows users (corporate / GPO environments) enforce AllSigned, so Node should either ship a signed npm.ps1 or provide an installer/launch shim that avoids unsigned PowerShell scripts being blocked.
Plan / next steps I will take:
Reproduce and document the failure with a minimal reproducible setup (nvm-windows + Set-ExecutionPolicy AllSigned), and capture exact installer behavior.
Inspect how npm/npm.cmd/npm.ps1 are packaged in Node ≥ 22 releases (installer/zip layout) and check whether npm.ps1 is present, signed, or marked/unblocked by the installer.
Evaluate possible fixes:
Ship a digitally signed npm.ps1 (coordination with release/signing process), or
Change the installer to create an executable shim (or use npm.cmd/node -e launcher) that does not rely on an unsigned PowerShell script when AllSigned is in effect, or
Add a documented installer step that marks the script as trusted during install (if safe/acceptable).
Produce a PR or a detailed proposal for the maintainers with test results and suggested remediation(s).
I’m happy to submit the PR and follow through with testing on affected Node versions. Could you please assign this issue to me?
Reacted by pronitsateli@BharathPESU
I'm happy to your comment and I tried to assign, but I couldn't find how to assign. It seems I don't have permission to assign issue.
can you some more detail about this issue
@BharathPESU
Thanks for your follow-up!
Just to clarify, my previous comment was only about the GitHub permission — I wanted to assign the issue to you, but it seems I don’t have permission to do that (since I’m not a collaborator on the repo).Regarding the issue itself, your summary is perfectly accurate. I don’t have anything to add at this point.
Thanks again for taking this up!
This issue has been marked as stale due to 210 days of inactivity.
It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.- addedstaleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.Issues and PRs marked stale due to inactivity and scheduled for automatic closure.
on Jun 5, 2026 This issue has been automatically closed after 30 days of inactivity following its stale status (no activity for a total of 240 days).
If this is still relevant, feel free to reopen it or leave a comment with additional details so we can continue the discussion.
Version
22.20.0
Platform
Subsystem
No response
What steps will reproduce the bug?
Set-ExecutionPolicy AllSigned -Scope LocalMachinenpm -v.Set-ExecutionPolicy RemoteSigned -Scope LocalMachinenpm -v.How often does it reproduce? Is there a required condition?
Installed with "AllSigned" PowerShell policy and Node.js >= 22, this problem always reproduce.
What is the expected behavior? Why is that the expected behavior?
Node.js can run npm command with any version of Node.js, even if the PowerShell execution policy is "AllSigned".
For example this screenshot (v20)
What do you see instead?
Node.js can not run npm command with Node.js >= 22 as below screenshot, if the PowerShell execution policy is "AllSigned".
The error Message is below.
Additional information
Though many people think it may be a matter of npm, but in this issue in npm, it was said that to fix this problem need to be coordinated with the Node project .
But any open issue about this problem in Node.js is not exist, so I raise this issue to Node.js side.
This bug occurs with below version. I checked those by switching Node.js version using nvm-windows.
I'm in trouble because I develop with machine with "AllSigned" PowerShell policy by Group-Policy.