【问题标题】:can't generate project with create-react-app无法使用 create-react-app 生成项目
【发布时间】:2019-11-16 16:38:29
【问题描述】:

我在 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".

info 访问linkadd 以获取有关此命令的文档。

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 完成。

不知道发生了什么。有什么帮助吗?

【问题讨论】:

  • 执行什么命令后出现此错误?
  • 你试过运行yarn cache clean吗?
  • 请正确format your code,以便清楚地区分您的问题和错误日志的内容
  • 请准确描述您在收到此错误之前运行的命令,以便我们reproduce the error

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


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 2020-06-14
    • 1970-01-01
    • 1970-01-01
    • 2017-07-29
    • 1970-01-01
    • 1970-01-01
    • 2021-06-29
    • 1970-01-01
    • 2020-10-10
    相关资源
    最近更新 更多