Ionic2 执行ionic启动时发生eOnt错误

Ionic2 执行ionic启动时发生eOnt错误,ionic2,Ionic2,我升级到beta.23,在使用“ionic start foo--v2--verbose”创建新项目时出现错误。 红色的错误表示 “无法生成命令错误:生成npm enoint(CLI v2.0.0-beta.23)。” 我已经安装了npm,可以从Windows8命令行运行。 我尝试升级到节点v5.9.1。 我确认npm在PATH环境变量中,可以从cmd shell运行npm。 任何关于如何进一步修复或调试的想法都将不胜感激 以下是完整的输出: C:\ionic2>ionic star

我升级到beta.23,在使用“ionic start foo--v2--verbose”创建新项目时出现错误。
红色的错误表示 “无法生成命令错误:生成npm enoint(CLI v2.0.0-beta.23)。”

我已经安装了npm,可以从Windows8命令行运行。 我尝试升级到节点v5.9.1。 我确认npm在PATH环境变量中,可以从cmd shell运行npm。 任何关于如何进一步修复或调试的想法都将不胜感激

以下是完整的输出:

   C:\ionic2>ionic start foo --v2 --verbose
   Task setting: title=start, name=start, summary=Starts a new Ionic project in the
    specified PATH, [options]=any flags for the command, <PATH>=directory for the n
    ew project, [template]=Starter templates can either come from a named     template,

   (ex: tabs, sidemenu, blank),
   a Github repo, a Codepen url, or a local directory.
   Codepen url,
Defaults to Ionic "tabs" starter template, --appname|-a=Human readable name     for
the app (Use quotes around the name), --id|-i=Package name for <widget id>     confi
g, ex: com.mycompany.myapp, title=Skip npm package installation,     boolean=true, t
itle=Create a basic structure without Cordova requirements, boolean=true,     title=
   Setup the project to use Sass CSS precompiling, boolean=true, title=List starter
 templates available, boolean=true, --io-app-id=The Ionic.io app ID to use, --te
mplate|-t=Project starter template, boolean=true, title=Start a Ionic v2 project
, boolean=true, title=(with --v2 only) Use TypeScript in starter, --zip-file|-z=
URL to download zipfile for starter template, module=./ionic/start, disableChang
ePwd=true
Utils.preprocessCliOptions _=[start, foo], skip-npm=false, no-cordova=false, w=f
alse, sass=false, s=false, list=false, l=false, v2=true, v=false, typescript=fal
se, -ts=false, verbose=true, $0=C:\Program Files\nodejs\node.exe C:\Users\bradtk
e\AppData\Roaming\npm\node_modules\ionic\bin\ionic

One awesome Ionic app coming right up...

Creating Ionic app in folder C:\ionic2\foo based on tabs project
     Downloading: https://github.com/driftyco/ionic2-app-base/archive/master.zip
     [=============================]  100%  0.0s
     Downloading: https://github.com/driftyco/ionic2-starter-          
       tabs/archive/master.zip
[=============================]  100%  0.0s
Installing npm packages...
Running exec command: npminstall
Utils.fail Unable to run spawn commandError: spawn npm ENOENT undefined
Utils.fail stack undefined
Utils.errorHandler is set, calling that now
Cli.Utils.errorHandler msg Unable to run spawn commandError: spawn npm ENOENT st
ring

Unable to run spawn commandError: spawn npm ENOENT (CLI v2.0.0-beta.23)

Your system information:

Cordova CLI: 6.1.0 (cordova-lib@undefined)
Ionic CLI Version: 2.0.0-beta.23
Ionic App Lib Version: 2.0.0-beta.13
OS: Windows 8.1
Node Version: v5.9.1
C:\ionic2>ionic启动foo--v2--verbose
任务设置:title=start,name=start,summary=start在
指定的路径,[options]=命令的任何标志,=n的目录
ew project,[template]=起始模板可以来自命名模板,
(例如:选项卡、侧菜单、空白),
Github repo、代码笔url或本地目录。
代码笔url,
默认为Ionic“tabs”启动程序模板,--appname |-a=用户可读的
应用程序(在名称周围使用引号),--id |-i=confi的包名
g、 例如:com.mycompany.myapp,title=跳过npm包安装,boolean=true,t
itle=创建没有Cordova要求的基本结构,布尔值=true,标题=
将项目设置为使用Sass CSS预编译,boolean=true,title=List starter
模板可用,布尔值=true,--io应用程序id=要使用的IONAL.io应用程序id,--te
mplate |-t=项目启动模板,boolean=true,title=启动项目
,boolean=true,title=(仅带--v2)在starter,-zip文件|-z中使用TypeScript=
用于下载初学者模板zipfile的URL,模块=。/ionic/start,disableChang
ePwd=真
Utils.preprocessCliOptions=[start,foo],skip npm=false,no cordova=false,w=f
alse,sass=false,s=false,list=false,l=false,v2=true,v=false,typescript=fal
se,-ts=false,verbose=true,$0=C:\Program Files\nodejs\node.exe C:\Users\bradtk
e\AppData\Roaming\npm\node\u模块\ionic\bin\ionic
一个很棒的离子应用马上就要出现了。。。
基于项目选项卡在文件夹C:\ionic2\foo中创建Ionic应用程序
下载:https://github.com/driftyco/ionic2-app-base/archive/master.zip
[==========================================]100%0.0s
下载:https://github.com/driftyco/ionic2-starter-          
tabs/archive/master.zip
[==========================================]100%0.0s
正在安装npm包。。。
正在运行exec命令:npminstall
Utils.fail无法运行spawn命令错误:spawn npm enonent未定义
Utils.fail堆栈未定义
设置了Utils.errorHandler,现在调用它
Cli.Utils.errorHandler msg无法运行spawn命令错误:spawn npm enoint st
戒指
无法运行spawn命令错误:spawn npm enoint(CLI v2.0.0-beta.23)
您的系统信息:
Cordova CLI:6.1.0(Cordova-lib@undefined)
爱奥尼亚CLI版本:2.0.0-beta.23
爱奥尼亚应用程序库版本:2.0.0-beta.13
操作系统:Windows 8.1
节点版本:v5.9.1
问候,,
布鲁斯

我也有同样的问题。在beta 22中工作

恢复到早期的测试版解决了此问题:

npm install -g ionic@2.0.0-beta.22

移动到应用程序的文件夹中并运行
npm install
。我不知道发生了什么,但听起来像是
start
脚本试图执行
npminstall
而不是
npm install

Installing npm packages...
Running exec command: npminstall

这是windows上CLI的已知问题。降级到cli beta22目前可以作为解决办法,但这将在下一版本中修复

升级npm对我有用。
npm安装-g npm

谢谢。降级到beta.22导致了这个技巧(enoint)错误。我能够创建新项目。FWIW,当我使用“ionic start foo--v2”创建一个项目时,我收到一条关于cordova版本必须大于4.2的令人讨厌的红色消息。但我的科尔多瓦是6.1。不确定这里发生了什么或影响。我们现在在2.0.0-beta.29上。有人知道这个问题现在是否在29年得到了妥善解决,或者我们是否仍应该降级到22年?如果最初的项目现在是用22做的,升级会对事情产生什么影响…想知道这是否还没有达到爱奥尼亚!我还必须在Win10上运行提升版以及手动安装npm。@mhartington,你好,Mike,我在Mac上,但我的同事在Windows上遇到了这个问题,即使在版本26中也是如此。我们现在是版本29,这个问题已经解决了吗?或者他应该继续保持22级的降级。如果他在22号,我在29号,这会有什么影响。。。