0
votes

I got an error when I try to install any package with npm install.

Here is an example when I try to install chart.js

H:\testNG>npm install chart.js --save npm ERR! path H:\testNG\node_modules\fsevents\node_modules\aws-sign2\package.json npm ERR! code EPERM npm ERR! errno -4048 npm ERR! syscall unlink npm ERR! Error: EPERM: operation not permitted, unlink 'H:\testNG\node_modules\fsevents\node_modules\aws-sign2\package.json' npm ERR! at Error (native) npm ERR! { Error: EPERM: operation not permitted, unlink 'H:\testNG\node_modules\fsevents\node_modules\aws-sign2\package.json' npm ERR! at Error (native) npm ERR! stack: 'Error: EPERM: operation not permitted, unlink \'H:\testNG\node_modules\fsevents\node_modules\aws-sign2\package.json\'\n at Error (native)', npm ERR! errno: -4048, npm ERR! code: 'EPERM', npm ERR! syscall: 'unlink', npm ERR! path: 'H:\testNG\node_modules\fsevents\node_modules\aws-sign2\package.json' } npm ERR! npm ERR! Please try running this command again as root/Administrator.

npm ERR! A complete log of this run can be found in: npm ERR!
C:\Users\flaur\AppData\Roaming\npm-cache_logs\2017-09-04T16_16_04_331Z-debug.log

I will provide the log file if someone want to watch it https://1drv.ms/u/s!AgNenwMMyZRWg4tRDcK4OeoiZKeVZw

1
And..I don't have any permission set on the file, just "ng new .." and "npm install chart.js --save".Filip Laurentiu
No antivirus, just Windows DefenderFilip Laurentiu
The following worked for me stackoverflow.com/a/51092497/1001395 (Spoiler, is not the Antivirus, is Windows Indexer!)Fernando Gonzalez Sanchez

1 Answers

-1
votes

i was occur same thing. now, i solved. that's so simply
npm 4.0 was not apply.. some node_modules packages. so you re install npm3.0