npm to a version without this bug:npm install -g npm@4When 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.

same error in the instalation it gives me:
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.
                    +10 fucking million.
I have been trying to debug this all morning. Only just started happening to me. NPM version is 5.0.3
Can somebody please find a solution.
fsevents should only be installed on osx. I think it's a bug with npm@5 https://github.com/mapbox/node-pre-gyp/issues/298
can you all try with npm 4 / use the proposed workaround (deleting and disabling package-lock)?
I have a feeling the recently merged #2550 will solve this in the next release.
Can someone please try downgrading to Node 6 or 7 to see if this persists for them?
I think this issue is related to Webpack, when I tried to create my own boilerplate without using create-react-app, the issue appears when I tried to add Webpack
I have the same problem, enviroment win7 64bit, create-react-app version : 1.3.1. what ?



I have same problem.
I try to downgrade npm to npm 4 latest.
I have no problem.
I downgrade to node 6.11.0 and npm 4.6 but the issue still there
+1銆俛nd i install react-router, then the issue still there
cc @thelarkinn, any ideas what happened? We didn't change anything on our side.
Same issue for me.
The exact error it gives me after running yarn start is:
yarn start v0.24.5
$ react-scripts start
module.js:471
    throw err;
    ^
Error: Cannot find module 'iconv-lite'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\Users\amnai\Desktop\react-tutorials\test\node_modules\external-editor\main\index.js:23:15)
    at Object.<anonymous> (C:\Users\amnai\Desktop\react-tutorials\test\node_modules\external-editor\main\index.js:218:4)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
error Command failed with exit code 1.
                    Try:
package-lock.json if you have oneyarn.lock if you have onenpm installnpm startDoes this help anyone?
@gaearon are you suggesting that just to diagnose the issue? Because I think it would be inconvenient to be forced to use an old npm...
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.
npm to a version without this bug:npm install -g npm@4If 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...
> [email protected] 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 [email protected]
node-pre-gyp info using [email protected] | 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 [email protected] and [email protected] (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: [email protected] (node_modules\fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node-pre-gyp install --fallback-to-build`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
                    npm install -g npm@4 it works, thanks very much
I've managed to make it work with the following setup:
node - v6.10.0
npm - v5.0.4
react-scripts - 1.0.10
os - win10
After the update to 1.0.10 I've also updated the react and react-dom versions to v15.6.1, I've deleted the package-lock.json and deleted the node_modules and re-installed the dependencies and then everything started working as it should be.
Hope this helps.
For me this worked:
npm install -g npm@4 works, thanks a lot :)
Most helpful comment
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.