简体   繁体   English

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

[英]can't generate project with create-react-app

I am using Linux on windows (WSL).我在 Windows (WSL) 上使用 Linux。 When I try to scaffold a project with create-react-app I get this message:当我尝试使用 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".

info Visit link add for documentation about this command. info 访问链接添加有关此命令的文档。

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

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

Don't know what's going on.不知道怎么回事。 Any help?有什么帮助吗?

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM