Expected behavior:
> yarn install
yarn install v0.16.1
[1/4] Resolving packages...
[2/4] Fetching packages...
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
Done in 124.17s.
Actual behavior:
> yarn install
yarn install v0.16.1
[1/4] Resolving packages...
[2/4] Fetching packages...
warning [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...
[4/4] Building fresh packages...
[1/2] ⠁ fsevents: gyp ERR! not ok
[-/2] ⠁ waiting...
[-/2] ⠁ waiting...
[-/2] ⠁ waiting...
error Error running install script for optional dependency: "E:\\git\\PHP\\Code\\wholesale-vue-ui\\node_modules\\fsevents: Command failed.\nExit code: 1\nCommand: C:\\WINDOWS\\system32\\cmd.exe\nArguments: /
d /s /c node-pre-gyp install --fallback-to-build\nDirectory: E:\\git\\PHP\\Code\\wholesale-vue-ui\\node_modules\\fsevents\nOutput:\nnode-pre-gyp info it worked if it ends with ok\nnode-pre-gyp info using nod
[email protected]\nnode-pre-gyp info using [email protected] | win32 | x64\nnode-pre-gyp info check checked for \"E:\\git\\PHP\\Code\\wholesale-vue-ui\\node_modules\\fsevents\\lib\\binding\\Release\\node-v47-win32-x
64\\fse.node\" (not found)\nnode-pre-gyp http GET https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.0.14/fse-v1.0.14-node-v47-win32-x64.tar.gz\nnode-pre-gyp http 404 https://fsevents-binaries.s3-us-wes
t-2.amazonaws.com/v1.0.14/fse-v1.0.14-node-v47-win32-x64.tar.gz\nnode-pre-gyp ERR! Tried to download: https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.0.14/fse-v1.0.14-node-v47-win32-x64.tar.gz \nnode
-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v47 ABI) (falling back to source compile with node-gyp) \nnode-pre-gyp http Pre-built binary not available for your system,
looked for https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.0.14/fse-v1.0.14-node-v47-win32-x64.tar.gz \ngyp info it worked if it ends with ok\ngyp info using [email protected]\ngyp info using [email protected].
0 | win32 | x64\ngyp info ok \ngyp info it worked if it ends with ok\ngyp info using [email protected]\ngyp info using [email protected] | win32 | x64\ngyp info spawn C:\\Python27\\python.EXE\ngyp info spawn args [ 'E
:\\\\git\\\\PHP\\\\Code\\\\wholesale-vue-ui\\\\node_modules\\\\node-gyp\\\\gyp\\\\gyp_main.py',\ngyp info spawn args 'binding.gyp',\ngyp info spawn args '-f',\ngyp info spawn args 'msvs',\ngyp info spa
wn args '-G',\ngyp info spawn args 'msvs_version=auto',\ngyp info spawn args '-I',\ngyp info spawn args 'E:\\\\git\\\\PHP\\\\Code\\\\wholesale-vue-ui\\\\node_modules\\\\fsevents\\\\build\\\\config.gy
pi',\ngyp info spawn args '-I',\ngyp info spawn args 'E:\\\\git\\\\PHP\\\\Code\\\\wholesale-vue-ui\\\\node_modules\\\\node-gyp\\\\addon.gypi',\ngyp info spawn args '-I',\ngyp info spawn args 'C:\\\\U
sers\\\\Will\\\\.node-gyp\\\\5.3.0\\\\include\\\\node\\\\common.gypi',\ngyp info spawn args '-Dlibrary=shared_library',\ngyp info spawn args '-Dvisibility=default',\ngyp info spawn args '-Dnode_root_di
r=C:\\\\Users\\\\Will\\\\.node-gyp\\\\5.3.0',\ngyp info spawn args '-Dnode_gyp_dir=E:\\\\git\\\\PHP\\\\Code\\\\wholesale-vue-ui\\\\node_modules\\\\node-gyp',\ngyp info spawn args '-Dnode_lib_file=node.li
b',\ngyp info spawn args '-Dmodule_root_dir=E:\\\\git\\\\PHP\\\\Code\\\\wholesale-vue-ui\\\\node_modules\\\\fsevents',\ngyp info spawn args '--depth=.',\ngyp info spawn args '--no-parallel',\ngyp info
spawn args '--generator-output',\ngyp info spawn args 'E:\\\\git\\\\PHP\\\\Code\\\\wholesale-vue-ui\\\\node_modules\\\\fsevents\\\\build',\ngyp info spawn args '-Goutput_dir=.' ]\nTraceback (most recen
t call last):\r\n File \"E:\\git\\PHP\\Code\\wholesale-vue-ui\\node_modules\\node-gyp\\gyp\\gyp_main.py\", line 16, in <module>\r\n sys.exit(gyp.script_main())\r\n File \"E:\\git\\PHP\\Code\\wholesale-v
ue-ui\\node_modules\\node-gyp\\gyp\\pylib\\gyp\\__init__.py\", line 545, in script_main\r\n return main(sys.argv[1:])\r\n File \"E:\\git\\PHP\\Code\\wholesale-vue-ui\\node_modules\\node-gyp\\gyp\\pylib\\
gyp\\__init__.py\", line 538, in main\r\n return gyp_main(args)\r\n File \"E:\\git\\PHP\\Code\\wholesale-vue-ui\\node_modules\\node-gyp\\gyp\\pylib\\gyp\\__init__.py\", line 523, in gyp_main\r\n gener
ator.GenerateOutput(flat_list, targets, data, params)\r\n File \"E:\\git\\PHP\\Code\\wholesale-vue-ui\\node_modules\\node-gyp\\gyp\\pylib\\gyp\\generator\\msvs.py\", line 2003, in GenerateOutput\r\n sln_
projects, project_objects, flat=msvs_version.FlatSolution())\r\n File \"E:\\git\\PHP\\Code\\wholesale-vue-ui\\node_modules\\node-gyp\\gyp\\pylib\\gyp\\generator\\msvs.py\", line 1762, in _GatherSolutionFold
ers\r\n return _DictsToFolders('', root, flat)\r\n File \"E:\\git\\PHP\\Code\\wholesale-vue-ui\\node_modules\\node-gyp\\gyp\\pylib\\gyp\\generator\\msvs.py\", line 1715, in _DictsToFolders\r\n for fol
der, contents in bucket.iteritems():\r\nAttributeError: 'MSVSProject' object has no attribute 'iteritems'\r\ngyp ERR! configure error \ngyp ERR! stack Error: `gyp` failed with exit code: 1\ngyp ERR! stack
at ChildProcess.onCpExit (E:\\git\\PHP\\Code\\wholesale-vue-ui\\node_modules\\node-gyp\\lib\\configure.js:305:16)\ngyp ERR! stack at emitTwo (events.js:87:13)\ngyp ERR! stack at ChildProcess.emit (
events.js:172:7)\ngyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)\ngyp ERR! System Windows_NT 10.0.14393\ngyp ERR! command \"C:\\\\PROGRAM FILES\\\\NODEJS\\\\node
.exe\" \"E:\\\\git\\\\PHP\\\\Code\\\\wholesale-vue-ui\\\\node_modules\\\\node-gyp\\\\bin\\\\node-gyp.js\" \"configure\" \"--fallback-to-build\" \"--module=E:\\\\git\\\\PHP\\\\Code\\\\wholesale-vue-ui\\\\node
_modules\\\\fsevents\\\\lib\\\\binding\\\\Release\\\\node-v47-win32-x64\\\\fse.node\" \"--module_name=fse\" \"--module_path=E:\\\\git\\\\PHP\\\\Code\\\\wholesale-vue-ui\\\\node_modules\\\\fsevents\\\\lib\\\\
binding\\\\Release\\\\node-v47-win32-x64\"\ngyp ERR! cwd E:\\git\\PHP\\Code\\wholesale-vue-ui\\node_modules\\fsevents\ngyp ERR! node -v v5.3.0\ngyp ERR! node-gyp -v v3.4.0\ngyp ERR! not ok \nnode-pre-gyp ERR
! build error \nnode-pre-gyp ERR! stack Error: Failed to execute 'C:\\PROGRAM FILES\\NODEJS\\node.exe E:\\git\\PHP\\Code\\wholesale-vue-ui\\node_modules\\node-gyp\\bin\\node-gyp.js configure --fallback-to-bu
ild --module=E:\\git\\PHP\\Code\\wholesale-vue-ui\\node_modules\\fsevents\\lib\\binding\\Release\\node-v47-win32-x64\\fse.node --module_name=fse --module_path=E:\\git\\PHP\\Code\\wholesale-vue-ui\\node_modul
es\\fsevents\\lib\\binding\\Release\\node-v47-win32-x64' (1)\nnode-pre-gyp ERR! stack at ChildProcess.<anonymous> (E:\\git\\PHP\\Code\\wholesale-vue-ui\\node_modules\\fsevents\\node_modules\\node-pre-gyp
\\lib\\util\\compile.js:83:29)\nnode-pre-gyp ERR! stack at emitTwo (events.js:87:13)\nnode-pre-gyp ERR! stack at ChildProcess.emit (events.js:172:7)\nnode-pre-gyp ERR! stack at maybeClose (intern
al/child_process.js:818:16)\nnode-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)\nnode-pre-gyp ERR! System Windows_NT 10.0.14393\nnode-pre-gyp ERR! command \"
C:\\\\PROGRAM FILES\\\\NODEJS\\\\node.exe\" \"E:\\\\git\\\\PHP\\\\Code\\\\wholesale-vue-ui\\\\node_modules\\\\fsevents\\\\node_modules\\\\node-pre-gyp\\\\bin\\\\node-pre-gyp\" \"install\" \"--fallback-to-bui
ld\"\nnode-pre-gyp ERR! cwd E:\\git\\PHP\\Code\\wholesale-vue-ui\\node_modules\\fsevents\nnode-pre-gyp ERR! node -v v5.3.0\nnode-pre-gyp ERR! node-pre-gyp -v v0.6.29\nnode-pre-gyp ERR! not ok \nFailed to exe
success Saved lockfile.
Done in 124.17s.
Sure, it ended with "success" and exit code 0, but I'm the one stuck explaining to my boss
"No really it's OK to just ignore that error"
and then my boss telling me,
"Well how am I gonna explain that to the client? It looks like the computer threw up all over the terminal!"
If I wanted to "fix" this, where would I start? Obviously it is already marked as an optionalDependency of chokidar. So my inital thoughts are:
"os": "darwin"?npm basically ignores 'os', it prints a warning but that's it. I haven't worked with yarn but it sounds like it works the same.
The current UX is regrettable but I'm disinclined to add hacks to fsevents to work around npm's broken behavior. The node-pre-gyp -> node-gyp dance is fragile enough that I don't like the idea of tacking on more stuff.
You could try petitioning npm but their CLI team seems to be permanently understaffed. You may have better luck with yarn.
Huh, now I thought I _used_ to have this problem with npm... but now I can only reproduce it in yarn. I'm going to see what yarn's deal is... I think it is marking it as an installation failure but not excluding it from its lifecycle build scripts, or something. Thanks for pointing me in the right direction.
Duplicate of https://github.com/yarnpkg/yarn/issues/1285
For posterity: Try using yarn install --ignore-optional
Most helpful comment
For posterity: Try using
yarn install --ignore-optional