javascript - react error-error:这可能不是 npm 的问题。上面可能有额外的日志输出
问题描述
在我的项目中,我使用的是反应。现在我要做的是将远程服务器中的项目部署到实际服务器中。我正在使用 npm 创建和启动一个项目。但是我无法构建我的项目,因为一次又一次发生以下错误,
C:\Users\User\react-tutorial>npm start
> react-tutorial@0.1.0 start C:\Users\User\react-tutorial
> react-scripts start
i 「wds」: Project is running at http://192.168.225.236/
i 「wds」: webpack output is served from
i 「wds」: Content not from webpack is served from C:\Users\User\react-tutorial\public
i 「wds」: 404s will fallback to /
Starting the development server...
events.js:292
throw er; // Unhandled 'error' event
^
Error: spawn cmd ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn cmd',
path: 'cmd',
spawnargs: [ '/s', '/c', 'start', '""', '/b', '"http://localhost:3000/"' ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react-tutorial@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-tutorial@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\User\AppData\Roaming\npm-cache\_logs\2020-07-27T07_26_30_467Z-debug.log
我该如何解决这个问题?
编辑:它工作我得到了答案
解决方案
推荐阅读
- java - 在 GCP 上运行 spring boot 应用程序:nginx 反向代理:加载资源失败:服务器响应状态为 502 (Bad Gateway)
- android - Android EditText MultiLine 可绘制重力
- knockout.js - 如何使用带有 KnockoutJS 的 JQuery DataTables 添加事件点击
- c++ - 调用 C 标准库函数的标准 C++ 方式
- php - 在 PHP 中对包含字母和数字的字符串进行排序
- c++ - Opencv静态库无法在eclipse中链接(添加了-ldl!)
- c++ - 使用模板的继承和强制转换未按预期工作
- scikit-learn - 将语料库流式传输到管道中的矢量化器
- swift - 如何在 Swift 4 中设置视频的偏移量?Seek(to:) 似乎不起作用
- window.open - 使用 window.open() 未正确形成重定向 URL