当我想在离子2中使用以下项目启动应用项目时出现错误:
ionic start name blank --v2
这里的错误:
One awesome Ionic app coming right up...
Downloading: https://github.com/driftyco/ionic2-app-base/archive/master.zip
[=============================] 100% 0.0s
Downloading: https://github.com/driftyco/ionic2-starter-blank/archive/master.zip
Installing Node Modules
Unable to run exec commandError: Command failed: C:\WINDOWS\system32\cmd.exe /s /c "npm install"
npm WARN package.json @ No description
npm WARN package.json @ No repository field.
npm WARN package.json @ No README data
npm WARN package.json @ No license field.
npm WARN optional dep failed, continuing fsevents@1.0.8
npm WARN deprecated graceful-fs@3.0.8: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.
npm WARN deprecated lodash@1.0.2: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.
npm WARN deprecated graceful-fs@1.2.3: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.
npm WARN deprecated npmconf@2.1.2: this package has been reintegrated into npm and is now out of date with respect to npm
npm WARN optional dep failed, continuing fsevents@1.0.8
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v4.3.2
npm ERR! npm v2.14.12
npm ERR! path C:\Users\Next-Version\AppData\Roaming\npm-cache\xtend\4.0.1\package\package.json.9c277ab6532ec69d68e9da8f764c6a72
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall rename
npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\Next-Version\AppData\Roaming\npm-cache\xtend\4.0.1\package\package.json.9c277ab6532ec69d68e9da8f764c6a72' -> 'C:\Users\Next-Version\AppData\Roaming\npm-cache\xtend\4.0.1\package\package.json'
npm ERR! at Error (native)
npm ERR! { [Error: EPERM: operation not permitted, rename 'C:\Users\Next-Version\AppData\Roaming\npm-cache\xtend\4.0.1\package\package.json.9c277ab6532ec69d68e9da8f764c6a72' -> 'C:\Users\Next-Version\AppData\Roaming\npm-cache\xtend\4.0.1\package\package.json']
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'rename',
npm ERR! path: 'C:\\Users\\Next-Version\\AppData\\Roaming\\npm-cache\\xtend\\4.0.1\\package\\package.json.9c277ab6532ec69d68e9da8f764c6a72',
npm ERR! dest: 'C:\\Users\\Next-Version\\AppData\\Roaming\\npm-cache\\xtend\\4.0.1\\package\\package.json',
npm ERR! parent: 'through2' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! C:\devcenter\rrpp\npm-debug.log
(CLI v2.0.0-beta.19)
Your system information:
Cordova CLI: 6.0.0
Ionic Version: 2.0.0-beta.3
Ionic CLI Version: 2.0.0-beta.19
Ionic App Lib Version: 2.0.0-beta.9
OS:
Node Version: v4.3.2
我尝试卸载并安装nodejs和ionic / cordova两次但获得相同的结果。当我在完美工作之前尝试过离子2,但是在更新到最后版本之后没有。
有任何帮助吗?谢谢!
P.S:我有Windows 10 x64
答案 0 :(得分:1)
我找到了解决方案。
我将nodejs从版本4更新到版本5.8.0。
除此之外,我手动删除了npm-cache文件夹。
我认为V=
0.599996469
2.099894456
3.569210247
5.00782203
6.446312
7.915719151
9.385065396
10.7932168
12.23198084
13.64010179
15.10944804
16.48692588
17.95630258
19.36433216
20.77223994
22.17975182
23.5255207
24.80912023
26.06067582
27.18810588
28.09951157
28.97908648
29.70498908
30.30847154
30.88170679
31.30260967
31.57133245
31.87149012
32.11115336
32.2905049
32.43985285
32.65094381
32.67893749
32.76855235
32.85847175
32.91808302
32.97790748
33.06861865
33.06764415
33.15862941
33.12728588
33.18784121
33.1872626
33.21741845
33.2169312
33.27773015
33.27742562
33.30770329
33.30742921
33.30715513
33.3069115
33.33731098
33.30648516
33.30633289
33.30621108
33.36725366
33.33654965
33.30584564
33.33633648
33.33624512
33.39737906
33.33609285
33.36664459
33.36655323
33.39710498
33.39707452
33.36637052
33.39695271
33.39692226
33.36627916
33.36621825
33.36615734
33.36612689
33.36609644
33.36606598
33.39661773
33.36597462
33.39655682
33.36591372
33.39646546
33.36570055
33.39631319
33.36567009
33.36570055
33.39631319
33.39628274
33.39628274
33.39631319
33.39631319
33.42689539
33.39628274
33.39628274
33.39628274
33.39628274
33.39631319
33.45747759
33.39631319
33.39628274
33.39631319
33.39628274
不起作用。
如果您遇到同样的问题,请在包含更多说明的类似帖子中查看我的回答:https://stackoverflow.com/a/35910287/2012904