node.js - npm start 问题(错误:spawn cmd ENOENT)
问题描述
我的申请有问题。因为在我创建应用程序之前它可以工作,但是现在,它向我显示了这个错误,我不知道为什么以及我必须做些什么来修复它。
你有什么想法可以帮助我吗?(这是一个 reactJS 应用程序)。
我检查了一些 stackoverflow 主题,但在我检查的所有地方,这并不是一个真正有效的答案。
events.js:180
throw er; // Unhandled 'error' event
^
Error: spawn cmd ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
at onErrorNT (internal/child_process.js:456:16)
at processTicksAndRejections (internal/process/task_queues.js:77:11)
Emitted 'error' event at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:270:12)
at onErrorNT (internal/child_process.js:456:16)
at processTicksAndRejections (internal/process/task_queues.js:77:11) {
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn cmd',
path: 'cmd',
spawnargs: [ '/c', 'start', '""', '/b', 'http://localhost:3000/' ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! fix-react-module@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the fix-react-module@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Lucas\AppData\Roaming\npm-cache\_logs\2019-07-16T09_33_39_111Z-debug.log
解决方案
将C:\Windows\System32添加到全局 PATH 环境变量中。
推荐阅读
- asp.net - dotvvm 框架上两个表的 linq
- c++ - 如何异步更新listmodel和listview
- oracle - 从 Oracle 中的一个非常大的表中选择 N 任意行
- swift - 无法在自定义 UITableViewcell Xamarin.IOS 上执行行选择导航
- perl - 当表单文件元素为空时,在 Perl 中处理多部分/表单数据会使用 Apple 设备调用 Apache 错误
- robotframework - 如何在 Robot Framework 中导入 Jar 或 Java 代码,使用 Java 中定义的方法
- sql-server - XSL - 显示存储为 blob 的图像
- android - 错误:将linkedin插件添加到Ionic3时,包com.linkedin.platform不存在
- django - Django:`相关字段查找无效:icontains`
- spring-boot - Keycloak 弹簧适配器 - 检查 authToken 在每个 http 请求中是否处于活动状态