一尘不染

尝试构建Cordova应用程序时获取'spawn cmd ENOENT'(event.js:85)

node.js

当我尝试构建(模拟)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

阅读 264

收藏
2020-07-07

共1个答案

一尘不染

我又检查了一次系统变量,发现了问题的原因:缺少C:\Windows\System32\变量。我添加了它就解决了我的问题

希望对您有帮助。

2020-07-07