-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
NPM install -g failed execution of postinstall-xxxxxx.cmd #5474
Comments
It looks like this is a limitation of your own operating system settings preventing you from running external scripts. This is not something npm can fix. |
The change using temporary script files was introduced with I'm not a node expert either, but it seems it's using Workaround: > $env:TEMP = '...' # path, where execution of scripts is allowed
> npm whatever A config setting / argument switch to guide run-script into a "safe" directory would be nice, though. |
A workaround (but still not a permanent solution) would be editing the file :: Created by npm, please don't edit manually.
@ECHO OFF
SET TMP=C:\UnrestricedFolder\temp
SET TEMP=C:\UnrestricedFolder\temp
SETLOCAL
... @wraithgar |
@wraithgar |
Issue
npm install -g electron
results in this errorOur company policies blocking the execution of cmd files from the appdata folder. Other modules like
electron-cli
did also fail with the same error message.Tried solutions
Overrule the installation path by adding
into
C:\Users\X\.npmrc
file, but the error persits.And installed NodeJS to
C:\data\dev\NodeJS
but this does still not solve the problem.Questions
postinstall-xxxxx.cmd
?postinstall-xxxxx.cmd
?EDIT 1
Ok, my bad. I just tried to install
expressjs
and had no such error. It seems like a problem related toelectron
, but I am not sure, because I don't work with NodeJS normally. If I am correct, please give me some feedback and I will close this issue.The text was updated successfully, but these errors were encountered: