OS Win10 x64 update 1607
yarn --version
0.24.5
node --version
位 yarn upgrade
yarn upgrade v0.24.5
[1/4] Resolving packages...
warning gulp-clean > through2 > xtend > [email protected]:
warning lite-server > browser-sync > localtunnel > request > [email protected]: Use uuid module instead
[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/upgrade for documentation about this command.
Spoiler Code
{
"name": "settingIni",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"devDependencies": {
"animate.css": "^3.5.2",
"bootstrap": "4.0.0-alpha.6",
"child_process": "^1.0.2",
"colors": "^1.1.2",
"del": "^2.2.2",
"fsevents": "^1.1.2",
"graceful-fs": "^4.1.11",
"gulp": "gulpjs/gulp#4.0",
"gulp-autoprefixer": "^4.0.0",
"gulp-clean": "^0.3.2",
"gulp-clean-css": "^3.4.1",
"gulp-color": "0.0.1",
"gulp-concat": "^2.6.1",
"gulp-concat-css": "^2.3.0",
"gulp-csso": "^3.0.0",
"gulp-data": "^1.2.1",
"gulp-debug": "^3.1.0",
"gulp-file-include": "^1.1.0",
"gulp-html-partial": "^1.0.1",
"gulp-if": "^2.0.2",
"gulp-include-html": "^1.0.14",
"gulp-load-plugins": "^1.5.0",
"gulp-notify": "^3.0.0",
"gulp-plumber": "^1.1.0",
"gulp-rename": "^1.2.2",
"gulp-sftp": "^0.1.5",
"gulp-sort": "^2.0.0",
"gulp-sourcemaps": "^2.6.0",
"gulp-stylus": "^2.6.0",
"gulp-uglify": "^3.0.0",
"gulp-useref": "^3.1.2",
"gulp-util": "^3.0.8",
"gulp-wait": "0.0.2",
"gulp-watch": "^4.3.11",
"hover.css": "^2.2.0",
"jquery": "^3.2.1",
"jquery-mask-plugin": "^1.14.11",
"jquery-ui": "^1.12.1",
"lite-server": "^2.3.0",
"magnific-popup": "^1.1.0",
"merge-stream": "^1.0.1",
"minimatch": "^3.0.4",
"owl.carousel": "^2.2.0",
"photoswipe": "^4.1.2",
"run-sequence": "^1.2.2",
"stylus": "^0.54.5",
"stylus-type-utils": "0.0.3",
"tether": "^1.4.0",
"wiredep": "^4.0.0"
}
}
Does it proceed with installation after that?
fsevents is a Mac-only dependency, if it is not marked as optional then you can't install the dependency on a Windows machine.
A way around is to use --ignore-engines flag IIRC.
what about optionalDependencies?
Is it worth it to put my fsevents@ there or not?
Yes, fsevents should be an optional dependency
Yes, this is not a Yarn bug. You're specifying fsevents as a devDependency, but fsevents doesn't work on Windows. You'll need to make it an optional dependency, otherwise you'll be unable to yarn install on Windows.
Most helpful comment
Yes, fsevents should be an optional dependency