-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] After npm upgrade, on Windows getting error that npm.ps1 is not digitally signed #7280
Comments
@anonmily running this seems to have fixed it for me in Powershell as an admin. |
The issue still persists in 10.5.2. @dennisrongo 's solution works, but I would see it as a temporary workaround. Do we have any plans on fixing the issue? |
This will need to be coordinated with the Node project. I'm going to keep this issue open to avoid duplicates but any fix for this will need to land in The https://github.com/nodejs/node Windows installer. |
thank you sir this command resolve my issue. |
I had the problem that I could not run npx commands like This comment solved it for me by using npx.cmd instead of npx: |
Recently, some similar happend with This error ocurrs, from my case and experience, when you update runtime without clean installation. Refering to "clean installation" like remove/uninstall previous node version and deleting all missing/remaining node files like I hope to be of help, greatings |
The solution to getting rid of this error message and running your script is simple. But you need to consider the scope before deciding how to fix it: Do you only want this particular script to run (here and now)? – or If you’re only looking to run the script this one time, use the following command to allow it to run in the current PowerShell session:
In the above command, the scope is set to ‘Process’. This means that the new execution policy is only valid in the current process. The old restrictions still apply outside of this specific PowerShell session. Alternatively, if you want to be able to run scripts freely on your system going forward, use the following command:
When the scope is set to ‘User’, the new PowerShell execution policy is persisted in the registry and will stick across PowerShell sessions, and system reboots. |
thank you |
Environment
DescriptionSo I came to this issue from #470 after looking for that bug duplicated against a newer npm version and something I'm wondering about is if the original underlying issue resulting in the new ps scripts (npm/npm#20699) still exists? Issue 20699 describes the repro as trying out
within Powershell, but when I do, I get the expected output of:
Trying out regular
I even made a ps1 file to test running that and it worked as expected:
I get:
As for fixing my issue as of now (https://stackoverflow.com/questions/58796490/tsc-ps1-cannot-be-loaded-because-running-scripts-is-disabled-on-this-system) , I moved all the offending |
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
I upgraded npm using
npm install -g npm@10.5.0
, and then afterwards, I can't use the npm command since I get the code execution error that npm.ps1 is not digitally signedThe text was updated successfully, but these errors were encountered: