【发布时间】:2018-02-04 06:34:27
【问题描述】:
我第一次尝试在我的桌面上安装 ionic 3 和 cordova。 我正在使用 Windows 7。
npm install -g ionic cordova
显示此错误:
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
C:\Users\amir\AppData\Roaming\npm\cordova -> C:\Users\amir\AppData\Ro
C:\Users\amir\AppData\Roaming\npm\ionic -> C:\Users\amir\AppData\Roam
npm ERR! path C:\Users\amir\AppData\Roaming\npm\node_modules\ionic\no
.json
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall unlink
npm ERR! Error: EPERM: operation not permitted, unlink 'C:\Users\amir
s\fsevents\node_modules\ansi-regex\package.json'
npm ERR! at Error (native)
npm ERR! { Error: EPERM: operation not permitted, unlink 'C:\Users\a
ules\fsevents\node_modules\ansi-regex\package.json'
npm ERR! at Error (native)
npm ERR! stack: 'Error: EPERM: operation not permitted, unlink \'C:
\ionic\\node_modules\\fsevents\\node_modules\\ansi-regex\\package.jso
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'unlink',
npm ERR! path: 'C:\\Users\\amir\\AppData\\Roaming\\npm\\node_module
i-regex\\package.json' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
我尝试在管理员模式下进入 Windows PowerShell,但问题没有解决。 请问有什么办法吗?
【问题讨论】: