zoukankan      html  css  js  c++  java
  • 升级ionic版本后,创建新项目报Error Initializing app错误解决

    命令行,进入项目路径后,运行

    ionic start myApp --v2

    命令执行后,报如下错误

    Installing npm packages...
    Error with start undefined
    Error Initializing app: There was an error with the spawned command: npminstall
    There was an error with the spawned command: npminstall
    Caught exception:
    undefined

    从githut查到是因为node和npm版本低了,解决方法如下

    https://github.com/driftyco/ionic-cli/issues/1089

    1.升级node

    win下直接官网下载最新安装包 https://nodejs.org/en/

    OS X 下运行命令

    npm install -g n

    2.升级npm

    upgrade npm

    3. 注册表重新注册  set new registry

    npm set registry http://registry.npmjs.org

     4. 结果按照上面的步骤执行完之后,

    cordova版本也低了,只好继续升级cordova

    npm install -g cordova

    但是cordova升级报错

    从github上面没找到答案,自己试着退出项目路径重新试了一下,结果就成功了……,所以升级和安装什么的,还是得在node的安装路径。

  • 相关阅读:
    自介
    打招呼
    试验四
    作业:实验二
    个人简介
    实验4
    构建之法—心得体会
    作业:实验二
    个人简介
    软件测试第四次博客作业2
  • 原文地址:https://www.cnblogs.com/viola-sh/p/5629215.html
Copyright © 2011-2022 走看看