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 fsevents@1.0.14: 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
It's a warning, not an error. It occurs because fsevents
is an optional dependency, used only when project is run on macOS environment (the package provides 'Native Access to Mac OS-X FSEvents').
And since you're running your project on Windows, fsevents
is skipped as irrelevant.
There is a PR to fix this behaviour here: https://github.com/npm/cli/pull/169
This still appears to be an issue, causing package installations to be aborted with warnings about optional packages not 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!
使用参数--force:
npm i -f
这已被注册为NPM问题: https : //github.com/npm/npm/issues/14042
This answer worked for me, add this to your package.json
"optionalDependencies": {
"fsevents": "^2.3.2"
}
I`m trying to run this project https://github.com/Soundnode/soundnode-app after updating my minimatch version to 3.10.9, im getting this 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 fsevents@1.0.14: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"ia32"})
my configuration is Node v - 4.4.2 npm v- 3.10.9 im working on 32 bit windows OS
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 .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.