Node gyp build error on fsevents on Windows after update to react-scripts 0.6.1
When running npm install no error should be reported.
Updated react-scripts from 0.4.3 to 0.6.1. When creating a new react application or running npm-install in an existing application fsevents causes a node-gyp build error on Windows:
node-pre-gyp ERR! Tried to download: https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.0.14/fse-v1.0.14-node-v48-win32-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v48 ABI) (falling back to source compile with node-gyp)
Traceback (most recent call last):
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py", line 16, in <module>
sys.exit(gyp.script_main())
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 545, in script_main
return main(sys.argv[1:])
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 538, in main
return gyp_main(args)
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 523, in gyp_main
generator.GenerateOutput(flat_list, targets, data, params)
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 2003, in GenerateOutput
sln_projects, project_objects, flat=msvs_version.FlatSolution())
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 1762, in _GatherSolutionFolders
return _DictsToFolders('', root, flat)
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 1715, in _DictsToFolders
for folder, contents in bucket.iteritems():
AttributeError: 'MSVSProject' object has no attribute 'iteritems'
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:305:16)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=E:\\Dev\\QDelft\\React\\test-eight\\node_modules\\react-scripts\\node_modules\\chokidar\\node_modules\\fsevents\
\lib\\binding\\Release\\node-v48-win32-x64\\fse.node" "--module_name=fse" "--module_path=E:\\Dev\\QDelft\\React\\test-eight\\node_modules\\react-scripts\\node_modules\\chokidar\\node_modules\\fsevents\\lib\\binding\\Release\\node-v48-win32-x64" "--python=python2.7" "--msvs_version=2013"
gyp ERR! cwd E:\Dev\QDelft\React\test-eight\node_modules\react-scripts\node_modules\chokidar\node_modules\fsevents
gyp ERR! node -v v6.7.0
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp.cmd configure --fallback-to-build --module=E:\Dev\QDelft\React\test-eight\node_modules\react-scripts\node_modules\chokidar\node_modules\fsevents\lib\binding\Release\node-v48-win32-x64\fse.node --module_name=fse --module_path=E:\Dev\QDelft\Re
act\test-eight\node_modules\react-scripts\node_modules\chokidar\node_modules\fsevents\lib\binding\Release\node-v48-win32-x64 --python=python2.7 --msvs_version=2013' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (E:\Dev\QDelft\React\test-eight\node_modules\react-scripts\node_modules\chokidar\node_modules\fsevents\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:106:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:191:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:877:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
node-pre-gyp ERR! System Windows_NT 6.3.9600
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "E:\\Dev\\QDelft\\React\\test-eight\\node_modules\\react-scripts\\node_modules\\chokidar\\node_modules\\fsevents\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd E:\Dev\QDelft\React\test-eight\node_modules\react-scripts\node_modules\chokidar\node_modules\fsevents
node-pre-gyp ERR! node -v v6.7.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.29
node-pre-gyp ERR! not ok
npm WARN install:[email protected] [email protected] install: `node-pre-gyp install --fallback-to-build`
npm WARN install:[email protected] Exit status 1
npm WARN optional Skipping failed optional dependency /react-scripts/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
npm WARN optional Skipping failed optional dependency /react-scripts/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
npm WARN optional Skipping failed optional dependency /react-scripts/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
Whereas this does not cause the app creation to fail, it would be preferable to have an install with no errors being reported for optional/platform specific dependencies.
I have confirmed that other node-gyp builds are functioning as expected with my current configuration.
I have also confirmed that reverting react-scripts back to 0.4.3 provides a clean install with the current configuration.
npm ls react-scripts (if you haven鈥檛 ejected): [email protected]node -v: v6.7.0npm -v: 3.10.3Appears related: https://github.com/npm/npm/issues/8921#issuecomment-243614253.
I have no idea how [email protected] is different from [email protected] in this regard.
Can you reproduce this if you create a new project?
Could it be some transitive dependency update?
The few recent reports I鈥檝e seen about it all mention [email protected].
Can you try updating to 3.10.8?
npm i -g [email protected]
@gaearon yes! That works perfectly thanks!
Thanks for the quick reply. I was looking for quite a while for a solution and even reinstalled the C++ compilers on Windows and updated to the latest node as I had the issue on a previous version of node as well. Who knew that the newest install had the issue in as well so I got misdirected.
Sorry for the time waster and thanks for the help!
No worries. npm bugs are the worst. 馃槃
Most helpful comment
No worries. npm bugs are the worst. 馃槃