Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create react app dependency error #2558

Closed
sumit-raikar opened this issue Jun 18, 2017 · 22 comments
Closed

Create react app dependency error #2558

sumit-raikar opened this issue Jun 18, 2017 · 22 comments

Comments

@sumit-raikar
Copy link

sumit-raikar commented Jun 18, 2017

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

@elmennani89
Copy link

same error in the instalation it gives me:

warning fsevents@1.1.2: The platform "win32" is incompatible with this module.
info "fsevents@1.1.2" is an optional dependency and failed compatibility check. Excluding it from installation.

@deehuey
Copy link

deehuey commented Jun 18, 2017

+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.

@viankakrisna
Copy link
Contributor

fsevents should only be installed on osx. I think it's a bug with npm@5 mapbox/node-pre-gyp#298
can you all try with npm 4 / use the proposed workaround (deleting and disabling package-lock)?

@Timer
Copy link
Contributor

Timer commented Jun 18, 2017

I have a feeling the recently merged #2550 will solve this in the next release.

@Timer
Copy link
Contributor

Timer commented Jun 18, 2017

Can someone please try downgrading to Node 6 or 7 to see if this persists for them?

@Timer Timer added this to the 1.0.8 milestone Jun 18, 2017
@elmennani89
Copy link

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

@Fea-Sin
Copy link

Fea-Sin commented Jun 19, 2017

I have the same problem, enviroment win7 64bit, create-react-app version : 1.3.1. what ?

qq 20170619102110
qq 20170619102201
qq 20170619102233

@9minimart
Copy link

9minimart commented Jun 19, 2017

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.

@elmennani89
Copy link

I downgrade to node 6.11.0 and npm 4.6 but the issue still there

@UNDERCOVERj
Copy link

+1。and i install react-router, then the issue still there

@gaearon
Copy link
Contributor

gaearon commented Jun 22, 2017

cc @TheLarkInn, any ideas what happened? We didn't change anything on our side.

@kylelamse
Copy link

Same issue for me.

  • node v6.11.0
  • npm 5.0.3
  • create-react-app 1.3.1
  • windows 10

@elmennani89
Copy link

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.

@gaearon
Copy link
Contributor

gaearon commented Jun 23, 2017

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?

@kylelamse
Copy link

@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...

@gaearon
Copy link
Contributor

gaearon commented Jun 23, 2017

Changing npm version takes a few minutes in my experience. npm@5 is known to have a lot of bugs, and I want to figure out if at least some cases are caused by npm@5 or not.

@gaearon
Copy link
Contributor

gaearon commented Jun 23, 2017

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.

@gaearon
Copy link
Contributor

gaearon commented Jun 23, 2017

I'm fairly sure it is this npm bug: npm/npm#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

@Fea-Sin
Copy link

Fea-Sin commented Jun 26, 2017

npm install -g npm@4 it works, thanks very much

@mnemanja
Copy link

mnemanja commented Jul 5, 2017

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.

@medeirosrich
Copy link

For me this worked:

  • delete package-lock.json
  • npm i -g npm
  • npm install

@VenkateshManohar27
Copy link

npm install -g npm@4 works, thanks a lot :)

@lock lock bot locked and limited conversation to collaborators Jan 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests