How to fix: "error fsevents@2.0.7: The platform "linux" is incompatible with this module."
I removed lines
fsevents@^1.2.7, fsevents@^2.0.6: version "2.0.7" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.0.7.tgz#382c9b443c6cbac4c57187cdda23aa3bf1ccfc2a" integrity sha512-a7YT0SV3RB+DjYcppwVDLtn13UQnmg0SWZS7ezZD0UjnLwXmy8Zm21GMVGLaFGimIqcvyMQaOJBrop8MyOp1kQ==
and
optionalDependencies: fsevents "^2.0.6"
from yarn.lock
. Next I removed
"fsevents": "2.0.7",
from resolutions
key in package.json
Finally on yarn install
I can see
info 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.
and
success Saved lockfile.
You do not need this module because of this is only for MacOS
Native access to MacOS FSEvents in Node.js
I'm getting the error now, but Heroku excludes fsevents and results in a successful deploy.
info fsevents@2.1.3: The platform "linux" is incompatible with this module.remote: info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.remote: info fsevents@1.2.13: The platform "linux" is incompatible with this module.remote: info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
https://my-app.herokuapp.com/ deployed to Heroku
.
I didn't modify yarn.lock
or any other files. I ended up at the post because I was curious about the error and now I know it's for macOS only. In other words ignore the error and leave yarn.lock
alone.