Node.js Ionic start give error:生成的命令npminstall出错
我正试图用爱奥尼亚和科尔多瓦创建一个移动应用程序,但当我启动comand时Node.js Ionic start give error:生成的命令npminstall出错,node.js,cordova,ionic-framework,npm,Node.js,Cordova,Ionic Framework,Npm,我正试图用爱奥尼亚和科尔多瓦创建一个移动应用程序,但当我启动comand时 ionic start {{appname}} blank 下载npm后给我 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 我可以看到下载
ionic start {{appname}} blank
下载npm后给我
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
我可以看到下载已完成,因为我可以看到生成的文件夹。我遵循了我在网上找到的所有建议,比如更新节点和npm,但没有任何效果。
以下是npm、node、cordova和ionic的版本
- 离子2.2.1
- 科尔多瓦6.5.0
- npm 4.4.1
- 节点6.10.0
ionic -v
我有这个:
******************************************************
Dependency warning - for the CLI to run correctly,
it is highly recommended to install/upgrade the following:
Please install your Cordova CLI to version >=4.2.0 `npm install -g cordova`
******************************************************
2.2.1
即使cordova版本>4.2.0,但我真的不认为这是主要问题。有什么想法吗
编辑:
我在用Windows7
ionic start myApp blank--v2
ionic start app blank --verbose
和以前一样,它停在了npminstall。问题是冗长没有告诉我真正的问题。
我在爱奥尼亚下载的文件夹中移动并启动
npm install --verbose
在这里,他告诉我问题在于https代理配置。
所以如果离子给出的误差是
There was an error with the spawned command: npminstall
只需进入下载的文件夹并启动
npm install --verbose
为了检查真正的问题我想出了如何解决依赖警告问题
cordova -v
然后你会遇到这样的问题:
May Cordova anonymously report usage statistics to improve the tool over time?
说“是”,然后修复警告问题。
然后全局安装npm
npm install -g npm
创建应用程序而不安装其软件包
ionic start app --v2 --skip-npm
到现在还可以吗?那么
cd app
安装软件包
npm install --save
完成了!尝试启动你的ionic应用程序
ionic serve
请提到你的操作系统信息。你说得对。我正在以管理员身份使用windows 7Open cmd,然后尝试运行此命令。我正在使用gitbash,因此我正在以管理员身份工作,因为我知道如何启动myApp blank--v2,试着运行此命令。这成功了!我不知道为什么,但是当我第一次在下载的文件夹中运行它时,
npm安装--verbose
被杀死了。就好像它被允许运行的时间有一个超时。我再次运行它,它成功地完成了。奇怪。