命令行,进入项目路径后,运行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的安装路径。