我試圖建立一個離子項目,但彈出錯誤。我已經設置了所有的環境變量。像節點,NPM,涼亭一切,離子是工作,和SDK API與更新22離子生成events.js 85未處理的錯誤事件
E:\io1\apa>ionic build android
running cordova build android
Running command: "C:\Program Files\nodejs\node.exe" E:\io1\apa\hooks\after_prepa
re\010_add_platform_class.js E:\io1\apa
add to body class: platform-android
Running command: E:\io1\apa\platforms\android\cordova\build.bat
events.js:85
throw er; // Unhandled 'error' event
^
Error: spawn cmd ENOENT
at exports._errnoException (util.js:746:11)
at Process.ChildProcess._handle.onexit (child_process.js:1053:32)
at child_process.js:1144:20
at process._tickCallback (node.js:355:11)
ERROR building one of the platforms: Error: E:\io1\apa\platforms\android\cordova
\build.bat: Command failed with exit code 1
You may not have the required environment or OS to build this project
Error: E:\io1\apa\platforms\android\cordova\build.bat: Command failed with exit
code 1
at ChildProcess.whenDone (C:\Users\Nitish\AppData\Roaming\npm\node_modules\c
ordova\node_modules\cordova-lib\src\cordova\superspawn.js:131:23)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1015:16)
at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
您需要分享有關您項目的更多信息。我建議你從模板項目開始並嘗試編譯。這個問題可能由許多因素引起(至少,我遇到過),很難用這麼少的信息進行調查 – aorfevre
我從安裝cordova和ionic開始,它工作正常,使用離子啓動myproject選項卡創建項目也能正常工作,和離子平臺添加android工作正常。但是當我嘗試構建我的項目時,它會閃爍此錯誤。 – nitishpisal