我剛更新npm
至5.4.0
。
現在,每當我想安裝一個NPM包我得到以下錯誤:錯誤:EPERM:操作不允許,取消鏈接'D: Sources ** node_modules fsevents node_modules abbrev package.json'
D:\Sources\DownloadCms\Md.Download\Web.Angular>npm install [email protected] --save
npm ERR! path D:\Sources\DownloadCms\Md.Download\Web.Angular\node_modules\fsevents\node_modules\abbrev\package.json
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall unlink
npm ERR! Error: EPERM: operation not permitted, unlink 'D:\Sources\DownloadCms\Md.Download\Web.Angular\node_modules\fsevents\node_modules\abbrev\package.json'
npm ERR! at Error (native)
npm ERR! { Error: EPERM: operation not permitted, unlink 'D:\Sources\DownloadCms\Md.Download\Web.Angular\node_modules\fsevents\node_modules\abbrev\package.jso
n'
npm ERR! at Error (native)
npm ERR! stack: 'Error: EPERM: operation not permitted, unlink \'D:\\Sources\\DownloadCms\\Md.Download\\Web.Angular\\node_modules\\fsevents\\node_modules\\ab
brev\\package.json\'\n at Error (native)',
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'unlink',
npm ERR! path: 'D:\\Sources\\DownloadCms\\Md.Download\\Web.Angular\\node_modules\\fsevents\\node_modules\\abbrev\\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\Mohammad\AppData\Roaming\npm-cache\_logs\2017-09-03T03_25_50_432Z-debug.log
我死了肯定,運行CMD
以管理員身份。
而且我查D:\Sources\DownloadCms\Md.Download\Web.Angular\node_modules\fsevents\node_modules\abbrev\package.json\
,package.json
路徑是不存在的!
編輯: 升級到V5.4.1,仍然得到同樣的錯誤,甚至無法與--no-可選:-(
' - 無選擇性'完全爲我釘了(@ 5.4.1)! –
太棒了! ' - 無選擇性'也爲我釘了! –