简体   繁体   中英

Can't install package with npm install, EPERM error

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM