错误:EPERM:不允许安装ionic 3和Cordova的操作

Ami*_*ani 2 node.js cordova ionic3

我正在尝试在桌面上首次安装ionic 3和cordova。我正在使用Windows 7。

npm install -g ionic cordova
Run Code Online (Sandbox Code Playgroud)

告诉我这个错误:

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.
Run Code Online (Sandbox Code Playgroud)

我尝试以管理员模式输入Windows PowerShell,但问题未解决。有什么想法吗?

Ami*_*ani 6

我解决了问题。

它与node-uuid无关。

我只是去appData / Roaming / npm而我删除了

节点模块文件夹

npm缓存

然后,它起作用了