Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js Ionic start give error:生成的命令npminstall出错_Node.js_Cordova_Ionic Framework_Npm - Fatal编程技术网

Node.js Ionic start give error:生成的命令npminstall出错

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 我可以看到下载

我正试图用爱奥尼亚和科尔多瓦创建一个移动应用程序,但当我启动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
我可以看到下载已完成,因为我可以看到生成的文件夹。我遵循了我在网上找到的所有建议,比如更新节点和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

  • 卸载所有(爱奥尼亚、科多娃、诺德JS)
  • 使用此URL安装nodejs LTS版本-
  • 使用此URL安装爱奥尼亚和科尔多瓦-
  • 同时重新安装Git,当它要求调整路径环境时,从Windows命令提示符中选择使用Git
  • 当你安装爱奥尼亚和科尔多瓦打开作为管理员cmd
  • 然后在
    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
    被杀死了。就好像它被允许运行的时间有一个超时。我再次运行它,它成功地完成了。奇怪。