繁体   English   中英

中止安装。 yarnpkg add --exact react react-dom react-scripts cra-template --cwd /home/ficho/workspace/storybook-tutorial 失败

[英]Aborting installation. yarnpkg add --exact react react-dom react-scripts cra-template --cwd /home/ficho/workspace/storybook-tutorial has failed

我无法创建新的反应应用程序。 到目前为止效果很好,但是今天我必须安装 yarn,因为我会收到这个错误,所以当我尝试创建一个新的 react 应用程序时:

➜  workspace npx create-react-app storybook-tutorial

Creating a new React app in /home/ficho/workspace/storybook-tutorial.

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

yarn add v1.22.10
[1/4] Resolving packages...
warning react-scripts > babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
warning react-scripts > workbox-webpack-plugin > workbox-build > @hapi/joi@15.1.1: Switch to 'npm install joi'
warning react-scripts > workbox-webpack-plugin > workbox-build > rollup-plugin-babel@4.4.0: This package has been deprecated and is no
 longer maintained. Please use @rollup/plugin-babel.
warning react-scripts > jest > @jest/core > jest-config > jest-environment-jsdom > jsdom > request-promise-native@1.0.9:
 request-promise-native has been deprecated because it extends the now
 deprecated request package, see
 https://github.com/request/request/issues/3142
warning react-scripts > jest > @jest/core > jest-config > jest-environment-jsdom > jsdom > request@2.88.2: request has been
 deprecated, see https://github.com/request/request/issues/3142
[2/4] Fetching packages...
info fsevents@1.2.12: The platform "linux" is incompatible with this module.
info "fsevents@1.2.12" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents@2.3.1: The platform "linux" is incompatible with this module.
info "fsevents@2.3.1" is an optional dependency and failed compatibility check. Excluding it from installation.
error postcss@8.2.4: The engine "node" is incompatible with this module. Expected version "^10 || ^12 || >=14". Got "13.8.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 /home/ficho/workspace/storybook-tutorial has failed.

Deleting generated file... package.json
Deleting generated file... yarn.lock
Deleting storybook-tutorial/ from /home/ficho/workspace
Done.

我使用 Ubuntu 18.4。

我尝试清除缓存: yarn cache clear and updates npm npm install -g npm@latest

升级您的 node.js 将解决此问题。

暂无
暂无

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

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