Closed
Description
Issue
npm install -g electron
results in this error
npm ERR! code 1
npm ERR! path C:\data\dev\dy\we\quick-start\node_modules\electron
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c C:\Users\X\AppData\Local\Temp\postinstall-a836babe.cmd
npm ERR! Blocked by group policy. Please contact your system administrator (translated).
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\X\AppData\Local\npm-cache\_logs\2022-09-06T09_22_56_569Z-debug-0.log
Our 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
prefix = 'C:\data\dev\npm-global'
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
- What does
postinstall-xxxxx.cmd
? - Is it possible to configure a different location for
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 to electron
, 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.
Metadata
Metadata
Assignees
Labels
No labels