本文介绍了当尝试构建Cordova应用程序(event.js:85)时获取'spawn cmd ENOENT'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试构建(模拟)Cordova应用程序时,在Windows cmd中获取此错误。

Get this error in windows cmd when I try to build (emulate) Cordova app.

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


推荐答案

我再次检查系统变量,的问题:
缺少 C:\Windows \System32\ 变量。
我添加了它,并解决了我的问题

I checked system variables one more time and found the cause of the problem:missing C:\Windows\System32\ variable.I added it and that solved my problem

希望,它也帮助你。

这篇关于当尝试构建Cordova应用程序(event.js:85)时获取'spawn cmd ENOENT'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-13 13:51
查看更多