Cordova アプリケーションをビルドしようとすると、「spawn cmd ENOENT」が発生します (event.js:85) 質問する

Cordova アプリケーションをビルドしようとすると、「spawn cmd ENOENT」が発生します (event.js:85) 質問する

Cordova アプリをビルド (エミュレート) しようとすると、Windows cmd でこのエラーが発生します。

D:\dev\Cordova\toDoList>cordova build android

Running command: D:\dev\Cordova\toDoList\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:1046:32)
at child_process.js:1137:20
at process._tickCallback (node.js:355:11)
ERROR building one of the platforms: Error: D:\dev\Cordova\toDoList\platforms\android\cordova\build.bat: Command failed with exit code 1
You may not have the required environment or OS to build this project

ベストアンサー1

システム変数をもう一度確認したところ、問題の原因が見つかりました。C:\Windows\System32\変数が不足していました。それを追加すると、問題は解決しました。

あなたにも役立つことを願っています。

おすすめ記事