命令行,進入項目路徑後,運行node
ionic start myApp --v2
命令執行後,報以下錯誤git
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:
undefinedgithub
從githut查到是由於node和npm版本低了,解決方法以下npm
https://github.com/driftyco/ionic-cli/issues/1089app
1.升級nodeionic
win下直接官網下載最新安裝包 https://nodejs.org/en/spa
OS X 下運行命令命令行
npm install -g n
2.升級npmcode
upgrade npm
3. 註冊表從新註冊 set new registrycordova
npm set registry http://registry.npmjs.org
4. 結果按照上面的步驟執行完以後,
cordova版本也低了,只好繼續升級cordova
npm install -g cordova
可是cordova升級報錯
從github上面沒找到答案,本身試着退出項目路徑從新試了一下,結果就成功了……,因此升級和安裝什麼的,仍是得在node的安裝路徑。