【问题标题】:Getting error while creating react project Aborting installation errno: -4094, code: 'UNKNOWN', syscall: 'spawn'创建反应项目时出错中止安装错误:-4094,代码:'UNKNOWN',系统调用:'spawn'
【发布时间】:2022-01-03 10:57:16
【问题描述】:

创建 react 应用时出现以下错误

E:\React>create-react-app ecomerce

Creating a new React app in E:\React\ecomerce.

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...


Aborting installation.
Unexpected error. Please report it as a bug:
Error: spawn UNKNOWN
    at ChildProcess.spawn (node:internal/child_process:412:11)
    at Object.spawn (node:child_process:698:9)
    at spawn (C:\Users\reeba\AppData\Roaming\npm\node_modules\create-react-app\node_modules\cross-spawn\index.js:12:24)
    at C:\Users\reeba\AppData\Roaming\npm\node_modules\create-react-app\createReactApp.js:390:19
    at new Promise (<anonymous>)
    at install (C:\Users\reeba\AppData\Roaming\npm\node_modules\create-react-app\createReactApp.js:341:10)
    at C:\Users\reeba\AppData\Roaming\npm\node_modules\create-react-app\createReactApp.js:468:16
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  errno: -4094,
  code: 'UNKNOWN',
  syscall: 'spawn'
}

Deleting generated file... package.json
Deleting ecomerce/ from E:\React
Done.

【问题讨论】:

  • 尝试执行npm cache clean --force 然后创建应用程序
  • 当我运行 npm cache clean --force 时,我将使用 --force 禁用推荐保护来获得 npm WARN。我怎样才能运行这个命令
  • @reebasiddiqui 这不是错误。它是信息,确保您知道您已通过--force,并且它通过禁用某些保护来完成其“强制”工作。

标签: reactjs npm node-modules create-react-app spawn


【解决方案1】:

我使用的是windows 10,当时我安装了熊猫杀毒,之后我的visual studio代码变得很慢,并且出现错误。我做了几种方法,但没有改变。然后我尝试卸载防病毒软件。最后错误不再出现,我的电脑也不再慢了。

【讨论】:

  • 您能补充更多细节吗?哪个杀毒软件?为什么你认为它与防病毒有关?肯定是同一个错误吗?您还有其他关于您的调查的信息吗?
  • 我使用的是windows 10,当时我安装了熊猫杀毒,之后我的visual studio代码变得很慢,并且出现了错误。我做了几种方法,但没有改变。然后我尝试卸载防病毒软件。最后错误不再出现,我的电脑也不再慢了。
  • 我推荐edit将此信息添加到答案本身,以便人们了解您的答案如何以及是否可以解决他们的问题。
  • 感谢您的推荐。抱歉,我是这里的新用户。
猜你喜欢
  • 2022-06-17
  • 1970-01-01
  • 1970-01-01
  • 2019-07-31
  • 1970-01-01
  • 2013-02-09
  • 1970-01-01
  • 1970-01-01
  • 2012-05-12
相关资源
最近更新 更多