create-react-app: Create react app dependency error

Note from Maintainers:

If you’re having this issue please roll back npm to a version without this bug:
npm install -g npm@4


When i try to create a new react application using create-react-app, it tries to download fsevents but fails ,also gives Error: Can’t find Python executable “python” and Error: Failed to execute 'node-gyp.cmd configure errors. I have attached the screenshot. Thank you in advance. error

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 1
  • Comments: 22 (8 by maintainers)

Most upvoted comments

I just tried with npm@5 and I saw the error noise (although eventually the installation finished successfully for me). In the meantime I recommend downgrading: npm i -g npm@4.

I’m fairly sure it is this npm bug: https://github.com/npm/npm/issues/16810. Unfortunately there’s nothing we can do until it’s fixed.


If you’re having this issue please roll back npm to a version without this bug:
npm install -g npm@4


If you still have a problem after downgrading npm please file a new issue with screenshots and details about your system.

Full error message (so that Google picks it up):

Installing packages. This might take a couple minutes.
Installing react, react-dom, and react-scripts...

> fsevents@1.0.17 install C:\Users\me\Desktop\lol123\node_modules\fsevents
> node-pre-gyp install --fallback-to-build

node-pre-gyp info it worked if it ends with ok
node-pre-gyp verb cli [ 'C:\\Program Files\\nodejs\\node.exe',
node-pre-gyp verb cli   'C:\\Users\\me\\Desktop\\lol123\\node_modules\\fsevents\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp',
node-pre-gyp verb cli   'install',
node-pre-gyp verb cli   '--fallback-to-build' ]
node-pre-gyp info using node-pre-gyp@0.6.32
node-pre-gyp info using node@8.1.2 | win32 | x64
node-pre-gyp verb command install []
node-pre-gyp info check checked for "C:\Users\me\Desktop\lol123\node_modules\fsevents\lib\binding\Release\node-v57-win32-x64\fse.node" (not found)
node-pre-gyp http GET https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.0.17/fse-v1.0.17-node-v57-win32-x64.tar.gz
node-pre-gyp http 404 https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.0.17/fse-v1.0.17-node-v57-win32-x64.tar.gz
node-pre-gyp ERR! Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.0.17/fse-v1.0.17-node-v57-win32-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for fsevents@1.0.17 and node@8.1.2 (node-v57 ABI) (falling back to source compile with node-gyp)
node-pre-gyp http 404 status code downloading tarball https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.0.17/fse-v1.0.17-node-v57-win32-x64.tar.gz
node-pre-gyp verb command build [ 'rebuild' ]

C:\Users\me\Desktop\lol123\node_modules\fsevents>if not defined npm_config_node_gyp (node "C:\Users\me\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" clean )  else (node "" clean )

C:\Users\me\Desktop\lol123\node_modules\fsevents>if not defined npm_config_node_gyp (node "C:\Users\me\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" configure --fallback-to-build --module=C:\Users\me\Desktop\lol123\node_modules\fsevents\lib\binding\Release\node-v57-win32-x64\fse.node --module_name=fse --module_path=C:\Users\me\Desktop\lol123\node_modules\fsevents\lib\binding\Release\node-v57-win32-x64 )  else (node "" configure --fallback-to-build --module=C:\Users\me\Desktop\lol123\node_modules\fsevents\lib\binding\Release\node-v57-win32-x64\fse.node --module_name=fse --module_path=C:\Users\me\Desktop\lol123\node_modules\fsevents\lib\binding\Release\node-v57-win32-x64 )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (C:\Users\me\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack     at PythonFinder.<anonymous> (C:\Users\me\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack     at C:\Users\me\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Windows_NT 10.0.14393
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\me\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\Users\\me\\Desktop\\lol123\\node_modules\\fsevents\\lib\\binding\\Release\\node-v57-win32-x64\\fse.node" "--module_name=fse" "--module_path=C:\\Users\\me\\Desktop\\lol123\\node_modules\\fsevents\\lib\\binding\\Release\\node-v57-win32-x64"
gyp ERR! cwd C:\Users\me\Desktop\lol123\node_modules\fsevents
gyp ERR! node -v v8.1.2
gyp ERR! node-gyp -v v3.6.2
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=C:\Users\me\Desktop\lol123\node_modules\fsevents\lib\binding\Release\node-v57-win32-x64\fse.node --module_name=fse --module_path=C:\Users\me\Desktop\lol123\node_modules\fsevents\lib\binding\Release\node-v57-win32-x64' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\Users\me\Desktop\lol123\node_modules\fsevents\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:125:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:213:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:897:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:208:5)
node-pre-gyp ERR! System Windows_NT 10.0.14393
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\me\\Desktop\\lol123\\node_modules\\fsevents\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\me\Desktop\lol123\node_modules\fsevents
node-pre-gyp ERR! node -v v8.1.2
node-pre-gyp ERR! node-pre-gyp -v v0.6.32
node-pre-gyp ERR! not ok
Failed to execute 'node-gyp.cmd configure --fallback-to-build --module=C:\Users\me\Desktop\lol123\node_modules\fsevents\lib\binding\Release\node-v57-win32-x64\fse.node --module_name=fse --module_path=C:\Users\me\Desktop\lol123\node_modules\fsevents\lib\binding\Release\node-v57-win32-x64' (1)
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.0.17 (node_modules\fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.0.17 install: `node-pre-gyp install --fallback-to-build`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

Try:

  • Removing package-lock.json if you have one
  • Removing yarn.lock if you have one
  • Downgrading npm to 3.x if it’s newer
  • Run npm install
  • Then run npm start

Does this help anyone?

I have same problem.

  • node 8.1.2
  • npm 5.0.3
  • create-react-app 1.3.1

I try to downgrade npm to npm 4 latest. I have no problem.