码迷,mamicode.com
首页 > 其他好文 > 详细

[ERROR] An error occurred while running npm i (exit code 1): code400

时间:2018-10-10 14:14:11      阅读:535      评论:0      收藏:0      [点我收藏+]

标签:https   mob   分享图片   eva   art   native   答案   ati   direct   

国庆来了,npm 的命令都不可以用:我新建了一个ionic的项目

ionic start ionc tabs

出现了这个报错:如下:

PS G:\lianxi\myionic02> ionic start myionic03 tabs
√ Creating directory .\myionic03 - done!
√ Downloading and extracting tabs starter - done!

? Would you like to integrate your new app with Cordova to target native iOS and Android? No
√ Personalizing ionic.config.json and package.json - done!

Installing dependencies may take several minutes.

* IONIC DEVAPP *

Speed up development with the Ionic DevApp, our fast, on-device testing mobile app

- Test on iOS and Android without Native SDKs
- LiveReload for instant style and JS updates

?--> Install DevApp: https://bit.ly/ionic-dev-app <--

> 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

 

图片看的应该更清晰一些:

技术分享图片

百度,谷歌搜了很多,没有找到答案,我一直以为是node或者angular的问题,

后来某位大神给我说可能是ionic‘的问题,至此问题才得以解决:

在c盘找到了.npmrc这个文件技术分享图片

把第一行和第4行删除,

在此执行  ionic start ionc tabs

问题完美解决

 

[ERROR] An error occurred while running npm i (exit code 1): code400

标签:https   mob   分享图片   eva   art   native   答案   ati   direct   

原文地址:https://www.cnblogs.com/adong69/p/9765489.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!