【发布时间】:2021-09-16 23:44:24
【问题描述】:
我让 alawys 使用 npm start 来运行 React 应用程序
这些天我尝试使用这个命令我得到一个错误
事情是这样的
ps:我使用的是 ubuntu 20.04
node:events:371
throw er; // Unhandled 'error' event
^
Error: spawn brave ENOENT
at Process.ChildProcess._handle.onexit (node:internal/child_process:282:19)
at onErrorNT (node:internal/child_process:480:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (node:internal/child_process:288:12)
at onErrorNT (node:internal/child_process:480:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -2,
code: 'ENOENT',
syscall: 'spawn brave',
path: 'brave',
spawnargs: [ 'http://localhost:3000' ]
}
我已经删除了缓存,
我确实删除了 node_modules 并运行了 npm install
我仍然面临同样的问题
如果我使用 sudo npm start 一切正常
【问题讨论】:
-
你用过 create-react-app 吗?如果是,是 npm 还是 npx ?你有什么节点版本?
-
我同时使用了 npx 和 npm,但仍然没有任何效果,我的节点版本是 16.4.1