zoukankan      html  css  js  c++  java
  • [ERROR] An error occurred while running npm i (exit code 1): code400

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

    ionic start ionc tabs

    出现了这个报错:如下:

    PS G:lianximyionic02> 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 odejs ode_cache\_logs2018-10-10T00_42_27_177Z-debug.log

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

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

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

    在c盘找到了.npmrc这个文件

    把第一行和第4行删除,

    在此执行  ionic start ionc tabs

    问题完美解决

  • 相关阅读:
    文件处理
    基本数据类型
    Python简介和入门
    了解计算机的发展历程
    工具类(MailUtils)发邮件
    文件上传和下载
    JavaWeb过滤器
    JavaWeb监听器
    JavaWeb的分页
    JdbcUtils(内部使用c3p0得到连接池对象datasource)的第三次修改---完成事务的处理
  • 原文地址:https://www.cnblogs.com/adong69/p/9765489.html
Copyright © 2011-2022 走看看