我正在尝试使用 npx 创建 react 应用程序并收到以下错误: error fork-ts-checker-webpack-plugin@1.5.0: The engine "yarn" is incompatible with this module. Expected version ">=1.0.0".
任何想法可能是问题的根源?任何提示将不胜感激。谢谢!
npx create-react-app 食物
npx: installed 91 in 5.566s
Creating a new React app in /home/oren/m/code/food.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...
yarn add v0.16.1
[1/4] Resolving packages...
[2/4] Fetching packages...
warning fsevents@1.2.9: The platform "linux" is incompatible with this module.
info "fsevents@1.2.9" is an optional dependency and failed compatibility check. Excluding it from installation.
warning fsevents@2.0.7: The platform "linux" is incompatible with this module.
info "fsevents@2.0.7" is an optional dependency and failed compatibility check. Excluding it from installation.
error fork-ts-checker-webpack-plugin@1.5.0: The engine "yarn" is incompatible with this module. Expected version ">=1.0.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 --cwd /home/oren/m/code/food has failed.
Deleting generated file... package.json
Deleting generated file... yarn.lock
Deleting food/ from /home/oren/m/code
Done.
Run Code Online (Sandbox Code Playgroud)
关于我的环境:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial
Run Code Online (Sandbox Code Playgroud)
$ uname -a
Linux oren 4.4.0-142-generic #168-Ubuntu SMP Wed Jan 16 21:00:45 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Run Code Online (Sandbox Code Playgroud)
节点 -v
v12.8.0
Run Code Online (Sandbox Code Playgroud)
npm -v
6.10.2
Run Code Online (Sandbox Code Playgroud)
小智 5
我已经通过安装最新版本的 Yarn 解决了。- 第一个卸载版本 - 安装最新版本npm install -g yarn
- 删除 AppData 文件夹中的纱线缓存文件夹解决了我的问题 C:\Users\test\AppData\Local\Yarn
| 归档时间: |
|
| 查看次数: |
2309 次 |
| 最近记录: |