2016-03-26 19 views
6

Ho eseguito l'upgrade a beta.23 e ho iniziato a ricevere un errore quando ho creato un nuovo progetto utilizzando 'ionic start foo --v2 --verbose'.
L'errore in rosso dice "Impossibile generare commandError: spawn npm ENOENT (CLI v2.0.0-beta.23)."ENOENT errore durante l'avvio ionico

Ho installato npm e posso eseguire da Windows 8 cmd line. Ho provato l'aggiornamento al nodo v5.9.1. Ho confermato che npm si trova nella variabile di ambiente PATH e può eseguire npm dalla shell di cmd. Qualsiasi idea su come correggere o eseguire il debug ulteriormente sarebbe apprezzata.

Ecco l'output completo:

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 ([email protected]) 
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 

saluti, Bruce

risposta

13

Ho lo stesso problema esatto. Ha lavorato in beta 22.

Tornando alla beta precedente ha risolto il problema:

npm install -g [email protected]-beta.22 
+0

Grazie. Il downgrade a beta.22 ha fatto l'errore (ENOENT). Sono in grado di creare un nuovo progetto. FWIW, quando creo un progetto usando 'ionic start foo --v2', ricevo un brutto messaggio rosso sulla versione di cordova che deve essere maggiore di 4.2. Ma il mio cordova è 6.1. Non so cosa sta succedendo qui o l'impatto. – brewsky

+0

Grazie che ha funzionato per me. –

+0

Siamo ora su 2.0.0-beta.29. Qualcuno sa se questo problema è stato corretto correttamente in 29, o dovremmo ancora eseguire il downgrade a 22? E in che modo l'aggiornamento influirebbe sulle cose se il progetto iniziale fosse ora realizzato usando 22 ... – redfox05

7

Sposta nella cartella della vostra applicazione ed eseguire npm install. Non so cosa sta succedendo, ma suona come start lo script tenta di eseguire npminstall piuttosto che npm install:

Installing npm packages... 
Running exec command: npminstall 
+1

Ho anche dovuto eseguire elevati su Win10 così come l'installazione manuale di npm. –

0

Questo è un problema noto con il CLI sulle finestre. Il downgrade a cli beta22 può funzionare come soluzione temporanea per ora, ma verrà risolto nella prossima versione

+0

Ti chiedi solo se è già stato risolto? Sono nella versione beta 29. – user1275105

+0

@mhartington, Ciao Mike, sono su Mac, ma il mio collega ha riscontrato questo problema su Windows, anche nella versione 26. Ora siamo sulla versione 29, questo problema è stato risolto? O dovrebbe continuare a rimanere in downgrade di 22. E come inciderà se lui è il 22 e il 29 su ... – redfox05

0

L'aggiornamento di npm ha funzionato per me. npm install -g npm