2017-02-14 4 views
0

EDIT: Es scheint zu funktionieren, wenn ich C: \ Programme \ nodejs \ nodevars.bat ausführen, bevor Sie etwas tun. Eine dauerhafte Lösung wäre dennoch erfreulich.Ionic wird nicht als externer oder interner Befehl erkannt.

EDIT 2: Die Lösung, die für mich funktioniert, ist C hinzuzufügen: \ Users {username} \ AppData \ Roaming \ npm vor C: \ Android \ npm in der PATH-Variablen, und dann um die Eingabeaufforderung erneut zu starten.

Ich versuche, Ionic auf Windows 10 zu installieren, und ich kann es nicht ausführen. Ich bekomme die Fehlermeldung: "Ionic wird nicht als externer oder interner Befehl erkannt".

Ich hatte bereits Cordova installiert, weil ich jQuery Mobile getestet habe, und ich denke, aus diesem Grund kann ich einige seltsame Dinge in meiner Umgebungsvariablen PATH passieren. Hier ist, wie es aussieht:

%USERPROFILE%\AppData\Local\Microsoft\WindowsApps;%ANT_HOME%\bin;%JAVA_HOME%\bin;%ANDROID_HOME%\platform-tools\;%ANDROID_HOME%\tools\;C:\Program Files\nodejs\;C:\Program Files\nodejs\node_modules\npm\bin\;C:\Users\Pierre\AppData\Roaming\npm\;C:\Android\npm\;C:\Android\npm\node_modules\cordova\bin\; 

Wenn ich cordova -v ausführen, es funktioniert, was zeigt, dass Cordova richtig installiert ist (auch weiß ich es, weil ich es richtig mit jQuery Mobile laufen).

Ich habe versucht, den npm Cache zu säubern und ionic erneut zu installieren, sowohl mit als auch ohne den Administratorstatus, und es hat nichts geändert. Hier ist die Ausgabe, wenn ich npm installieren laufen -g ionischer:

npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue. 
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue. 
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue. 
npm WARN deprecated [email protected]: use uuid module instead 
npm WARN deprecated [email protected]: use uuid module instead 
C:\Users\Pierre\AppData\Roaming\npm\ionic -> C:\Users\Pierre\AppData\Roaming\npm\node_modules\ionic\bin\ionic 
C:\Users\Pierre\AppData\Roaming\npm 
`-- [email protected] 

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected]^1.0.0 (node_modules\ionic\node_modules\chokidar\node_modules\fsevents): 
npm WARN potsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) 
npm WARN In [email protected] replacing bundled version of cross-spawn with [email protected] 
npm WARN In [email protected] replacing bundled version of semver with [email protected] 
npm WARN In [email protected] replacing bundled version of mime-types with [email protected] 
npm WARN In [email protected] replacing bundled version of form-data with [email protected] 
npm WARN In [email protected] replacing bundled version of request with [email protected] 
npm WARN In [email protected] replacing bundled version of ionic-app-lib with [email protected] 

ich viele Warnungen haben, aber ich weiß nicht, ob es überhaupt zu tun hat. Vielen Dank für Ihre Hilfe.

Antwort

3

Sind Sie sicher, dass Ionic und Cordova in Ihrem PATH enthalten sind? Ich habe vor kurzem Ionic und Cordova wieder installiert und hatte viele Probleme damit. Einige sagen, dass Cordova und Ionic automatisch im PATH enthalten sein sollten, wenn sie installiert sind, aber ich habe festgestellt, dass dies nicht der Fall ist. Sie sollten diese Zeile zu Ihrem PFAD hinzufügen: c: \ users \ Ihr Name \ AppData \ Roaming \ npm \

+0

Vielen Dank, es funktioniert. Ich dachte, ich hätte das schon gemacht, aber ich habe die Kommandozeile nicht neu gestartet. – Driblou

+0

Gern geschehen :) Ja, manchmal habe ich auch vergessen, den Cmd Aha neu zu starten – DevMoutarde

Verwandte Themen