我嘗試使用npm install安裝任何軟件包時出現錯誤。無法使用npm install安裝軟件包,EPERM錯誤
下面是一個例子,當我嘗試安裝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
我將提供日誌文件,如果有人想看到它 https://1drv.ms/u/s!AgNenwMMyZRWg4tRDcK4OeoiZKeVZw
And ..我沒有任何權限設置在文件上,只是「ng new ..」和「npm install chart.js --save」。 –
沒有殺毒軟件,只是Windows Defender –