node.js - 无法使用 create-react-app 生成项目

标签 node.js reactjs npm create-react-app yarnpkg

我在 Windows (WSL) 上使用 Linux。 当我尝试使用 create-react-app 搭建一个项目时,我收到了这条消息:

error An unexpected error occurred: "ENOENT: no such file or directory, lstat '/home/sashacode/.cache/yarn/v4/npm-table-5.2.3-cde0cc6eb06751c009efab27e8c820ca5b67b7f2/node_modules/table/README.md'".
info If you think this is a bug, please open a bug report with the information provided in "/mnt/c/Users/PC2/Apps/react_projects/new_world/yarn-error.log".

信息访问link添加有关此命令的文档。

Aborting installation.
yarnpkg add --exact react react-dom react-scripts --cwd /mnt/c/Users/PC2/Apps/react_projects/new_world has failed.

正在删除生成的文件... node_modules 删除生成的文件... package.json 删除生成的文件... yarn.lock 完成。

不知道怎么回事。有帮助吗?

最佳答案

更新node js到新版本 然后再次运行 create-react-app 这应该可以解决您的问题

关于node.js - 无法使用 create-react-app 生成项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56913314/

相关文章:

typescript - 如何使用 Jest 和 TypeScript 模拟第三方 nodejs 模块功能?

node.js - 无法执行 "sudo npm install --save firebase-admin"

reactjs - 在 Expo 上的 React Native 项目中,什么更好地管理状态?

javascript - WebStorm - 制作 node_modules "library root"但也将其排除在索引之外

node.js - Jest 测试 : Cannot find module '../Link.react' from 'Link.react.js'

node.js - 运行单元测试管道时 Github 操作错误

reactjs - 无法导入路径下 tsconfig.json 中定义为别名的文件

html - 使用变量时危险地 react SetInnerHTML 不起作用

node.js - 从 Node 中的模块加载特定文件

node.js - 未处理的拒绝: Headers cant be set after they are sent