The platform "win32" is incompatible with this module (fsevents)

16,352

Solution 1

You can ignore this warning. See more about this warning here

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

To disable this message try using:

yarn config set ignore-engines true

Or try use --use-npm --no-optional flags

npx create-react-app first-react-app --use-npm --no-optional

Solution 2

I tried all the solutions offered here, but the best solution was to add both

--ignore-engines --ignore-platform 

I'm a Windows 10 user, my yarn version is 1.22.17. Probably it will work also for npm. My problem came from [email protected]

So the final cmdlet was:

yarn install --ignore-engines --ignore-platform
Share:
16,352
Sinan.D
Author by

Sinan.D

Updated on June 12, 2022

Comments

  • Sinan.D
    Sinan.D almost 2 years

    I'm trying to create React app using npx create-react-app first-react-app.

    When it start to create the app, I'm getting the warning below every time. At the end it's create an app. But what is the reason and how can I resolve this problem permanently?

    Here is the all logs:

    yarn add v1.22.10
    [1/4] Resolving packages...
    [2/4] Fetching packages...
    info [email protected]: The platform "win32" is incompatible with this module.
    info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
    info [email protected]: The platform "win32" is incompatible with this module.
    info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
    info [email protected]: The platform "win32" is incompatible with this module.
    info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
    [3/4] Linking dependencies...
    warning "react-scripts > @typescript-eslint/eslint-plugin > [email protected]" 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 [email protected]: The platform "win32" is incompatible with this module.
    info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
    info [email protected]: The platform "win32" is incompatible with this module.
    info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
    info [email protected]: The platform "win32" is incompatible with this module.
    info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
    [3/4] Linking dependencies...
    warning "react-scripts > @typescript-eslint/eslint-plugin > [email protected]" 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/[email protected]" 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 [email protected]: The platform "win32" is incompatible with this module.
    info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
    info [email protected]: The platform "win32" is incompatible with this module.
    info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
    info [email protected]: The platform "win32" is incompatible with this module.
    info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
    warning " > @testing-library/[email protected]" has unmet peer dependency "@testing-library/dom@>=7.21.4".
    warning "react-scripts > @typescript-eslint/eslint-plugin > [email protected]" 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.
    
  • Sinan.D
    Sinan.D over 3 years
    Thanks for information and your suggestion, but still getting warnings.
  • xom9ikk
    xom9ikk over 3 years
    @Sinan.D, I updated the answer, try --use-npm flag
  • xom9ikk
    xom9ikk over 3 years
    @Sinan.D, try npx create-react-app first-react-app --use-npm --no-optional. If it helps, let me know, I'll update the answer
  • Sinan.D
    Sinan.D over 3 years
    Thanks again, get the warnings again but at hte end it's creating. Maybe the only way to get rid of it would be to use a platform that is supported by fsevents, i.e. switch to macOS as @jonrsharpe suggested.
  • xom9ikk
    xom9ikk over 3 years
    @Sinan.D, yes, this will be the best solution)
  • C.T. Bell
    C.T. Bell over 2 years
    This did not work for me. Issue still remains $ yarn global --ignore-engines --ignore-platform add n yarn global v1.22.17 [1/4] Resolving packages... [2/4] Fetching packages... error [email protected]: The platform "win32" is incompatible with this module. error Found incompatible module. info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.