【发布时间】:2021-02-28 21:21:58
【问题描述】:
我已经找到了一些关于此的帖子,但现有的解决方案似乎都不起作用。
- OSX 大苏尔
- 纱线 1.22.10
- npm 7.0.11
- 我更新了 xcode 开发者工具。
- 我删除了 npm 缓存
- 我删除了 .npm 和 .yarnrc 文件夹
然后尝试使用npx create-react-app 启动一个新的 React 应用程序并获得以下信息:
error An unexpected error occurred: "expected workspace package to exist for \"eslint\"".
info If you think this is a bug, please open a bug report with the information provided in "/Users/gdboling/Projects/BalancedComp/clients/packages/rewards/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Aborting installation.
yarnpkg add --exact react react-dom react-scripts cra-template --cwd /Users/gdboling/Projects/BalancedComp/clients/packages/rewards has failed.
日志文件有:
26 verbose stack Error: command failed
26 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/index.js:64:27)
26 verbose stack at ChildProcess.emit (node:events:329:20)
26 verbose stack at maybeClose (node:internal/child_process:1055:16)
26 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:288:5)
【问题讨论】:
-
如果您已解决此问题,请返回并自行回答@Gregg
-
有锻炼吗?
标签: reactjs create-react-app npx macos-big-sur