當我嘗試安裝phonegap時,我得到了一個錯誤。如果我使用管理控制檯我得到相同errror:Phonegap不能安裝在Windows 10與npm
C:\Windows\system32>npm i -g phonegap
npm WARN deprecated [email protected]: connect 2.x series is deprecated
npm WARN deprecated [email protected]: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
npm WARN deprecated [email protected]: Use uuid module instead
C:\Users\juand\AppData\Roaming\npm\phonegap -> C:\Users\juand\AppData\Roaming\npm\node_modules\phonegap\bin\phonegap.js
npm ERR! path C:\Users\juand\AppData\Roaming\npm\node_modules\phonegap\node_modules\nan\package.json
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall unlink
npm ERR! Error: EPERM: operation not permitted, unlink 'C:\Users\juand\AppData\Roaming\npm\node_modules\phonegap\node_modules\nan\package.json'
npm ERR! at Error (native)
npm ERR! { Error: EPERM: operation not permitted, unlink 'C:\Users\juand\AppData\Roaming\npm\node_modules\phonegap\node_modules\nan\package.json'
npm ERR! at Error (native)
npm ERR! stack: 'Error: EPERM: operation not permitted, unlink \'C:\\Users\\juand\\AppData\\Roaming\\npm\\node_modules\\phonegap\\node_modules\\nan\\package.json\'\n at Error (native)',
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'unlink',
npm ERR! path: 'C:\\Users\\juand\\AppData\\Roaming\\npm\\node_modules\\phonegap\\node_modules\\nan\\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\juand\AppData\Roaming\npm-cache\_logs\2017-09-05T21_35_02_068Z-debug.log
C:\Windows\system32>node -v
v6.11.2
C:\Windows\system32>npm -v
5.4.0
NPM版本升級,節點版本是最後6.x的(LTS)。看起來它工作正常,但。
只需添加版本 – user2670996