ionic 创建项目报错
ionic start xxx 创建项目之后:走到 npm 之后开始报错
> npm i
× Running command - failed!
[ERROR] An error occurred while running npm i (exit code 1):
npm ERR! code E400
npm ERR! 400 Bad Request: @angular/common@5.2.11
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Program Files\nodejs\node_cache\_logs\2018-10-10T00_42_27_177Z-debug.log
请问这个问题是什么问题?我后续的都有问题,刚开始没有关注这个,项目也可以运行,但是除了可以运行其他都不行了,我对比了一下package.json,发现angular的配置一个都没有,我百度了一下,也没有找到问题所在,请大神帮看看,非常感谢
以下是错误日志,我看了一下,不知道该怎么办:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\dev\\nodejs\\node.exe',
1 verbose cli 'C:\\dev\\nvm\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'i' ]
2 info using npm@6.2.0
3 info using node@v8.1.0
4 verbose npm-session b9daa2ee962b0910
5 silly install runPreinstallTopLevelLifecycles
6 silly preinstall myionic03@0.0.1
7 info lifecycle myionic03@0.0.1~preinstall: myionic03@0.0.1
8 silly install loadCurrentTree
9 silly install readLocalPackageData
10 timing stage:loadCurrentTree Completed in 40ms
11 silly install loadIdealTree
12 silly install cloneCurrentTreeToIdealTree
13 timing stage:loadIdealTree:cloneCurrentTree Completed in 1ms
14 silly install loadShrinkwrap
15 timing stage:loadIdealTree:loadShrinkwrap Completed in 5ms
16 silly install loadAllDepsIntoIdealTree
17 http fetch GET 400 https://registry.npm.taobao.org/@angular%2fcommon 629ms
18 http fetch GET 400 https://registry.npm.taobao.org/@angular%2fanimations 632ms
19 silly fetchPackageMetaData error for @angular/common@5.2.11 400 Bad Request: @angular/common@5.2.11
20 silly fetchPackageMetaData error for @angular/animations@5.2.11 400 Bad Request: @angular/animations@5.2.11
21 http fetch GET 400 https://registry.npm.taobao.org/@angular%2fcompiler-cli 648ms
22 silly fetchPackageMetaData error for @angular/compiler-cli@5.2.11 400 Bad Request: @angular/compiler-cli@5.2.11
23 http fetch GET 400 https://registry.npm.taobao.org/typescript 674ms
24 http fetch GET 400 https://registry.npm.taobao.org/@angular%2fforms 667ms
25 http fetch GET 400 https://registry.npm.taobao.org/@angular%2fcore 668ms
26 http fetch GET 400 https://registry.npm.taobao.org/@angular%2fhttp 666ms
27 http fetch GET 400 https://registry.npm.taobao.org/@angular%2fcompiler 674ms
28 http fetch GET 400 https://registry.npm.taobao.org/@angular%2fplatform-browser 664ms
29 silly fetchPackageMetaData error for typescript@~2.6.2 400 Bad Request: typescript@~2.6.2
30 silly fetchPackageMetaData error for @angular/forms@5.2.11 400 Bad Request: @angular/forms@5.2.11
31 silly fetchPackageMetaData error for @angular/core@5.2.11 400 Bad Request: @angular/core@5.2.11
32 silly fetchPackageMetaData error for @angular/http@5.2.11 400 Bad Request: @angular/http@5.2.11
33 silly fetchPackageMetaData error for @angular/compiler@5.2.11 400 Bad Request: @angular/compiler@5.2.11
34 silly fetchPackageMetaData error for @angular/platform-browser@5.2.11 400 Bad Request: @angular/platform-browser@5.2.11
35 http fetch GET 400 https://registry.npm.taobao.org/@ionic%2fapp-scripts 724ms
36 silly fetchPackageMetaData error for @ionic/app-scripts@3.2.0 400 Bad Request: @ionic/app-scripts@3.2.0
37 http fetch GET 400 https://registry.npm.taobao.org/@ionic-native%2fcore 282ms
38 silly fetchPackageMetaData error for @ionic-native/core@~4.15.0 400 Bad Request: @ionic-native/core@~4.15.0
39 http fetch GET 400 https://registry.npm.taobao.org/@ionic-native%2fsplash-screen 268ms
40 silly fetchPackageMetaData error for @ionic-native/splash-screen@~4.15.0 400 Bad Request: @ionic-native/splash-screen@~4.15.0
41 http fetch GET 400 https://registry.npm.taobao.org/@ionic-native%2fstatus-bar 248ms
42 http fetch GET 400 https://registry.npm.taobao.org/ionic-angular 245ms
43 http fetch GET 400 https://registry.npm.taobao.org/zone.js 226ms
44 silly fetchPackageMetaData error for @ionic-native/status-bar@~4.15.0 400 Bad Request: @ionic-native/status-bar@~4.15.0
45 silly fetchPackageMetaData error for ionic-angular@3.9.2 400 Bad Request: ionic-angular@3.9.2
46 silly fetchPackageMetaData error for zone.js@0.8.26 400 Bad Request: zone.js@0.8.26
47 http fetch GET 400 https://registry.npm.taobao.org/ionicons 270ms
48 silly fetchPackageMetaData error for ionicons@3.0.0 400 Bad Request: ionicons@3.0.0
49 http fetch GET 400 https://registry.npm.taobao.org/rxjs 279ms
50 silly fetchPackageMetaData error for rxjs@5.5.11 400 Bad Request: rxjs@5.5.11
51 http fetch GET 400 https://registry.npm.taobao.org/@angular%2fplatform-browser-dynamic 341ms
52 silly fetchPackageMetaData error for @angular/platform-browser-dynamic@5.2.11 400 Bad Request: @angular/platform-browser-dynamic@5.2.11
53 http fetch GET 400 https://registry.npm.taobao.org/@ionic%2fstorage 293ms
54 silly fetchPackageMetaData error for @ionic/storage@2.2.0 400 Bad Request: @ionic/storage@2.2.0
55 http fetch GET 400 https://registry.npm.taobao.org/sw-toolbox 292ms
56 silly fetchPackageMetaData error for sw-toolbox@3.6.0 400 Bad Request: sw-toolbox@3.6.0
57 http fetch GET 400 https://registry.npm.taobao.org/@angular%2fcommon 237ms
58 silly fetchPackageMetaData error for @angular/common@5.2.11 400 Bad Request: @angular/common@5.2.11
59 http fetch GET 400 https://registry.npm.taobao.org/@angular%2fhttp 237ms
60 silly fetchPackageMetaData error for @angular/http@5.2.11 400 Bad Request: @angular/http@5.2.11
61 http fetch GET 400 https://registry.npm.taobao.org/@angular%2fcompiler-cli 259ms
62 silly fetchPackageMetaData error for @angular/compiler-cli@5.2.11 400 Bad Request: @angular/compiler-cli@5.2.11
63 http fetch GET 400 https://registry.npm.taobao.org/@angular%2fanimations 267ms
64 silly fetchPackageMetaData error for @angular/animations@5.2.11 400 Bad Request: @angular/animations@5.2.11
65 http fetch GET 400 https://registry.npm.taobao.org/@ionic-native%2fcore 268ms
66 silly fetchPackageMetaData error for @ionic-native/core@~4.15.0 400 Bad Request: @ionic-native/core@~4.15.0
67 http fetch GET 400 https://registry.npm.taobao.org/@angular%2fplatform-browser-dynamic 279ms
68 http fetch GET 400 https://registry.npm.taobao.org/@angular%2fforms 281ms
69 http fetch GET 400 https://registry.npm.taobao.org/@angular%2fcore 282ms
70 http fetch GET 400 https://registry.npm.taobao.org/@angular%2fcompiler 286ms
71 silly fetchPackageMetaData error for @angular/platform-browser-dynamic@5.2.11 400 Bad Request: @angular/platform-browser-dynamic@5.2.11
72 silly fetchPackageMetaData error for @angular/forms@5.2.11 400 Bad Request: @angular/forms@5.2.11
73 silly fetchPackageMetaData error for @angular/core@5.2.11 400 Bad Request: @angular/core@5.2.11
74 silly fetchPackageMetaData error for @angular/compiler@5.2.11 400 Bad Request: @angular/compiler@5.2.11
75 http fetch GET 400 https://registry.npm.taobao.org/@angular%2fplatform-browser 315ms
76 silly fetchPackageMetaData error for @angular/platform-browser@5.2.11 400 Bad Request: @angular/platform-browser@5.2.11
77 http fetch GET 400 https://registry.npm.taobao.org/@ionic%2fstorage 253ms
78 silly fetchPackageMetaData error for @ionic/storage@2.2.0 400 Bad Request: @ionic/storage@2.2.0
79 http fetch GET 400 https://registry.npm.taobao.org/@ionic-native%2fsplash-screen 326ms
80 silly fetchPackageMetaData error for @ionic-native/splash-screen@~4.15.0 400 Bad Request: @ionic-native/splash-screen@~4.15.0
81 http fetch GET 400 https://registry.npm.taobao.org/ionic-angular 297ms
82 http fetch GET 400 https://registry.npm.taobao.org/@ionic-native%2fstatus-bar 323ms
83 silly fetchPackageMetaData error for ionic-angular@3.9.2 400 Bad Request: ionic-angular@3.9.2
84 silly fetchPackageMetaData error for @ionic-native/status-bar@~4.15.0 400 Bad Request: @ionic-native/status-bar@~4.15.0
85 http fetch GET 400 https://registry.npm.taobao.org/ionicons 294ms
86 http fetch GET 400 https://registry.npm.taobao.org/rxjs 283ms
87 http fetch GET 400 https://registry.npm.taobao.org/sw-toolbox 283ms
88 http fetch GET 400 https://registry.npm.taobao.org/zone.js 282ms
89 silly fetchPackageMetaData error for ionicons@3.0.0 400 Bad Request: ionicons@3.0.0
90 silly fetchPackageMetaData error for rxjs@5.5.11 400 Bad Request: rxjs@5.5.11
91 silly fetchPackageMetaData error for sw-toolbox@3.6.0 400 Bad Request: sw-toolbox@3.6.0
92 silly fetchPackageMetaData error for zone.js@0.8.26 400 Bad Request: zone.js@0.8.26
93 timing stage:rollbackFailedOptional Completed in 2ms
94 timing stage:runTopLevelLifecycles Completed in 5587ms
95 silly saveTree myionic03@0.0.1
96 verbose stack Error: 400 Bad Request: @angular/common@5.2.11
96 verbose stack at fetch.then.res (C:\dev\nvm\npm\node_modules\npm\node_modules\pacote\lib\fetchers\registry\fetch.js:42:19)
96 verbose stack at tryCatcher (C:\dev\nvm\npm\node_modules\npm\node_modules\bluebird\js\release\util.js:16:23)
96 verbose stack at Promise._settlePromiseFromHandler (C:\dev\nvm\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:512:31)
96 verbose stack at Promise._settlePromise (C:\dev\nvm\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:569:18)
96 verbose stack at Promise._settlePromise0 (C:\dev\nvm\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:614:10)
96 verbose stack at Promise._settlePromises (C:\dev\nvm\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:693:18)
96 verbose stack at Async._drainQueue (C:\dev\nvm\npm\node_modules\npm\node_modules\bluebird\js\release\async.js:133:16)
96 verbose stack at Async._drainQueues (C:\dev\nvm\npm\node_modules\npm\node_modules\bluebird\js\release\async.js:143:10)
96 verbose stack at Immediate.Async.drainQueues (C:\dev\nvm\npm\node_modules\npm\node_modules\bluebird\js\release\async.js:17:14)
96 verbose stack at runCallback (timers.js:800:20)
96 verbose stack at tryOnImmediate (timers.js:762:5)
96 verbose stack at processImmediate [as _immediateCallback] (timers.js:733:5)
97 verbose cwd G:\lianxi\myionic02\myionic03
98 verbose Windows_NT 10.0.17134
99 verbose argv "C:\\dev\\nodejs\\node.exe" "C:\\dev\\nvm\\npm\\node_modules\\npm\\bin\\npm-cli.js" "i"
100 verbose node v8.1.0
101 verbose npm v6.2.0
102 error code E400
103 error 400 Bad Request: @angular/common@5.2.11
104 verbose exit [ 1, true ]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
去掉淘宝镜像就行了。淘宝镜像有问题,经常会出现npm安装失败