1

我尝试使用 yarn 安装 react-app 并收到以下错误消息:

纱线版本:1.22.17

npm 版本:8.3.0

它还显示“未找到锁定文件”的错误。

$ yarn create react-app redux-shopping-app
yarn create v1.22.17
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed "create-react-app@5.0.0" with binaries:
      - create-react-app

Creating a new React app in E:\Workspace\Scaler Development\06 React\redux-shopping-app.

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...

yarn add v1.22.17
info No lockfile found.
[1/4] Resolving packages...
warning react-scripts > @svgr/webpack > @svgr/plugin-svgo > svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
[2/4] Fetching packages...
error eslint@8.5.0: The engine "node" is incompatible with this module. Expected version "^12.22.0 || ^14.17.0 || >=16.0.0". Got "14.16.0"
error Found incompatible module.
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 E:\Workspace\Scaler Development\06 React\redux-shopping-app has failed.        

Deleting generated file... package.json
Deleting redux-shopping-app/ from E:\Workspace\Scaler Development\06 React
Done.
error Command failed.
Exit code: 1
Command: C:\Users\abc\AppData\Local\Yarn\bin\create-react-app
Arguments: redux-shopping-app
Directory: E:\Workspace\Scaler Development\06 React
Output:

info Visit https://yarnpkg.com/en/docs/cli/create for documentation about this command.
4

0 回答 0