升級ionic版本後,建立新項目報Error Initializing app錯誤解決

來源:互聯網
上載者:User

標籤:

 

命令列,進入項目路徑後,運行

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

但是繼續報錯

從github上面沒找到答案,自己試著退出項目路徑重新試了一下,結果就成功了……,所以升級和安裝什麼的,還是得在node的安裝路徑。

 

升級ionic版本後,建立新項目報Error Initializing app錯誤解決

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.