'npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents
I'm trying to run this project.
After updating minimatch version to 3.10.9, I'm getting the following error:
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\webpack\node_modules\watchpack\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"ia32"})
My configuration:
Node v - 4.4.2
npm v - 3.10.9
32 bit windows OS
Solution 1:[1]
This still appears to be an issue, causing package installations to be aborted with warnings about optional packages no being installed because of "Unsupported platform".
The problem relates to the "shrinkwrap" or package-lock.json which gets persisted after every package manager execution. Subsequent attempts keep failing as this file is referenced instead of package.json.
Adding these options to the npm install command should allow packages to install again.
--no-optional argument will prevent optional dependencies from being installed.
--no-shrinkwrap argument, which will ignore an available package lock or
shrinkwrap file and use the package.json instead.
--no-package-lock argument will prevent npm from creating a package-lock.json file.
The complete command looks like this:
npm install --no-optional --no-shrinkwrap --no-package-lock
nJoy!
Solution 2:[2]
Using parameter --force:
npm i -f
Solution 3:[3]
This answer worked for me, add this to your package.json
"optionalDependencies": {
"fsevents": "^2.3.2"
}
Solution 4:[4]
Unsupported platform for fsevents
The current best solution is upgrading your version of npm, which won't have this warning.
If using a Windows machine, an easy way to upgrade is with the tool Upgrade npm on Windows.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | |
| Solution 2 | JeFF - JXG |
| Solution 3 | rMonteiro |
| Solution 4 | Super Jade |
