reactjs - 平台 "win32"与此模块不兼容 (fsevents)

标签 reactjs npm yarnpkg fsevents

我正在尝试使用 npx create-react-app first-react-app 创建 React 应用程序.
当它开始创建应用程序时,我每次都会收到以下警告。最后是创建一个应用程序。但原因是什么,我该如何永久解决这个问题?
这是所有日志:

yarn add v1.22.10
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.2.13: The platform "win32" is incompatible with this module.
info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents@2.2.1: The platform "win32" is incompatible with this module.
info "fsevents@2.2.1" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents@2.1.3: The platform "win32" is incompatible with this module.
info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "react-scripts > @typescript-eslint/eslint-plugin > tsutils@3.17.1" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
[4/4] Building fresh packages...
success Saved lockfile.
success Saved 6 new dependencies.

Installing template dependencies using yarnpkg...
yarn add v1.22.10
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@2.2.1: The platform "win32" is incompatible with this module.
info "fsevents@2.2.1" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents@1.2.13: The platform "win32" is incompatible with this module.
info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents@2.1.3: The platform "win32" is incompatible with this module.
info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "react-scripts > @typescript-eslint/eslint-plugin > tsutils@3.17.1" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
warning " > @testing-library/user-event@12.6.0" has unmet peer dependency "@testing-library/dom@>=7.21.4".
[4/4] Building fresh packages...
success Saved lockfile.
success Saved 17 new dependencies.
Done in 179.26s.
Removing template package using yarnpkg...

yarn remove v1.22.10
[1/2] Removing module cra-template...
[2/2] Regenerating lockfile and installing missing dependencies...
info fsevents@2.2.1: The platform "win32" is incompatible with this module.
info "fsevents@2.2.1" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents@1.2.13: The platform "win32" is incompatible with this module.
info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents@2.1.3: The platform "win32" is incompatible with this module.
info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
warning " > @testing-library/user-event@12.6.0" has unmet peer dependency "@testing-library/dom@>=7.21.4".
warning "react-scripts > @typescript-eslint/eslint-plugin > tsutils@3.17.1" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
success Uninstalled packages.
Done in 54.33s.

最佳答案

您可以忽略此警告。查看有关此警告的更多信息 here

this is expected and can be ignored. We can't yet ignore optional packages (in this case canvas)


要禁用此消息,请尝试使用:
yarn config set ignore-engines true
或尝试使用 --use-npm --no-optional旗帜
npx create-react-app first-react-app --use-npm --no-optional

关于reactjs - 平台 "win32"与此模块不兼容 (fsevents),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65382064/

相关文章:

javascript - 安装 expo 包失败,错误为 : yarnpkg exited with non-zero code: 1 yarnpkg exited with non-zero code: 1

reactjs - 在 Windows 10 的 WSL ubuntu 上设置 Cypress

git - .npmignore 扩展/继承自 .gitignore

css - 如何在 webpack 中包含 materialize-css npm 包

typescript - 如果 npm 或 yarn 存在于 Typescript 项目中,它们是否具有自动安装 @types 的功能?

Docker 撰写运行 yarn 安装

javascript - React - 动态表单字段,其中字段根据下拉菜单更改(使用 Hook )

javascript - 我需要使用一个处理程序处理不同的输入 onChange 方法

reactjs - ReactJS 中带有 <picture> 和 <source> 的响应式图像

node.js - npm chokidar 发射事件两次