我在启动项目时遇到问题。 ionic start myApp2
这是我得到的错误:
Fetching plugin "org.apache.cordova.device" via plugin registry
Fetching plugin "org.apache.cordova.console" via plugin registry
Fetching plugin "https://github.com/driftyco/ionic-plugins-keyboard" via git clone
Error: Command failed: fatal: Could not change back to 'C:/Windows/System/myApp2': No such file or directory
at ChildProcess.exithandler (child_process.js:648:15)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:756:16)
at Process.ChildProcess._handle.onexit (child_process.js:823:5)
Unable to add plugins. Perhaps your version of Cordova is too old. Try up
(npm install -g cordova), removing this project folder, and trying again.
我刚刚安装了Cordova和Ionic,所以我不认为他们的版本是个问题。这是我在整个安装过程中所做的。
npm config set proxy http://...
npm config set https-proxy http://...
git config --global http.proxy http://...
git config --global https.proxy http://...
npm install -g cordova ionic
除了最接近下面的错误之外,我找不到同样的错误(我相信上面的步骤7解决了这个错误)
Error: Command failed: fatal: could not create work tree dir C:\Users\DAVIDH~1\AppData\Local\Temp\plugman\git\...'.: No such file or directory
myApp2确实存在,在其插件目录中我可以看到org.apache.cordova.device和org.apache.cordova.console。我尝试重新安装Node.js,Android SDK,Git,Cordova和Ionic,只是为了再次遇到这个错误。
编辑:我在PATH中也有这些:
C:\Program Files (x86)\Java\jdk1.5.0_08\bin;
C:\Program Files (x86)\Java\jre1.5.0_08\bin;
C:\Users\mohamada\AppData\Local\Android\android-sdk\tools;
C:\Users\mohamada\AppData\Local\Android\android-sdk\platforms;
C:\Users\mohamada\Downloads\apache-ant-1.9.4\bin;
C:\Program Files (x86)\Git\bin;
C:\Program Files\nodejs\;
C:\Users\mohamada\AppData\Roaming\npm\node_modules\ionic\bin;
C:\Users\mohamada\AppData\Roaming\npm\node_modules\cordova\bin
提前感谢您的帮助, Atikah