【问题标题】:npm install --no-audit --save --save-exact --loglevel error react react-dom react-scripts cra-template has failednpm install --no-audit --save --save-exact --loglevel 错误 react-dom react-scripts cra-template 失败
【发布时间】:2022-10-18 21:23:01
【问题描述】:

在中创建一个新的 React 应用程序E:\Dokuman Visual Code\react.js\project-app.

安装软件包。这可能需要几分钟。 使用 cra-template 安装 react、react-dom 和 react-scripts...

npm ERR! code EBADF
npm ERR! EBADF: bad file descriptor, write

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\FIKCROS\AppData\Local\npm-cache\_logs\2022-04-05T01_02_39_053Z-debug-0.log

Aborting installation.
  npm install --no-audit --save --save-exact --loglevel error react react-dom react-scripts cra-template has failed.

Deleting generated file... package.json
Deleting project-app/ from E:\Dokuman Visual Code\react.js
Done.

【问题讨论】:

  • 尝试使用 LTS 版本,它修复了我的问题。
  • 希望这工作。 npm cache clean --force

标签: node.js reactjs react-native npm


【解决方案1】:

我有确切的问题。 对我有用的是: 我已将 VSCode 的终端从 Powershell 更改为 bash(重新启动终端应该会有所帮助)。

运行以下命令:

  1. 运行npm 缓存清理 --force
  2. 然后运行npx create-react-app(项目名称)

    希望这可以帮助你

【讨论】:

    【解决方案2】:

    Kurulum esnasında hata alınırsa sırası ile aşağıdaki komutlar çalıştırılmalıdır。 ;

    1-npm 缓存验证 2-npm 安装 npm@latest

    【讨论】:

    猜你喜欢
    • 2021-01-27
    • 1970-01-01
    • 2019-12-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-12-12
    • 2020-08-08
    • 2022-01-06
    相关资源
    最近更新 更多