create-react-app icon indicating copy to clipboard operation
create-react-app copied to clipboard

Creating new app - fsevents problem

Open niedomnie opened this issue 10 years ago • 10 comments

Hello there, there is a problem while creating new app.

$ node -v v6.0.0 $ npm -v 3.8.6 $ mkdir tmp $ cd tmp $ create-react-app client2

output Creating a new React app in /home/user/gatesync/webserver/client2.

Installing packages. This might take a couple minutes. Installing react-scripts from npm...

[email protected] install /home/user/gatesync/webserver/client2/node_modules/react-scripts/node_modules/chokidar/node_modules/fsevents node-pre-gyp install --fallback-to-build

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-linux-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)

but eventually it succeeds except npm WARN optional Skipping failed optional dependency /react-scripts/fsevents: npm WARN notsup Not compatible with your operating system or architecture: [email protected]

Should it be like this? Is it needed for something?

Artur

niedomnie avatar Oct 28 '16 13:10 niedomnie

After $ npm i -g npm@latest $ npm -v 3.10.9 $ create-react-app client3 .... npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/react-scripts/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/react-scripts/node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

Artur

niedomnie avatar Oct 28 '16 13:10 niedomnie

Yes, it's expected on Linux and Windows. Unfortunately there is nothing we can do about how npm logs its warnings.

gaearon avatar Oct 28 '16 14:10 gaearon

Hi, I'm getting a similar issue to this except when I get to the node-pre-gyp error parts I never get past them, have left attempts running over 30 minutes and no joy. I'm using the below setup...

OSX El Capitan v.10.11.6 Node 7.0.0 npm 4.0.5

Any help would be much appreciated! Trying to go through the Learn Pure React book.

Marnnn avatar Jan 05 '17 07:01 Marnnn

This is likely an issue with your npm or Node installation. Create React App doesn't do anything special here, it just calls npm install. I'm sorry we can't help you more. 😞

gaearon avatar Jan 05 '17 13:01 gaearon

This does sound like an npm or Node problem. Have you tried a different version of Node/npm? I suggest installing NVM and using that to install either an older or newer version of Node, maybe 6.9.3 or 7.4.0. NVM will set you up with a fresh environment, isolated from whatever you currently have, and maybe it'll work better.

Just for kicks, you could also try installing yarn (npm install -g yarn), and then re-running create-react-app. CRA should detect yarn and use that instead of npm. In theory, yarn will run the same commands to build fsevents, but maybe it'll do something differently that makes it work.

dceddia avatar Jan 05 '17 14:01 dceddia

Thanks Dan and Dave.

I did a full uninstall of Node and reinstalled using Brew to version 7.4.0 but got the same issue. Now trying 6.9.3 through NVM but it's going slowly, will let you know how it progresses!

Will give Yarn a go if NVM doesn't get me anywhere.

Thanks for the tips!

Marnnn avatar Jan 05 '17 14:01 Marnnn

Connection went super slow but finally got v6.9.3 installed via NVM and that has done the trick!

Only odd thing I'm experiencing is that I need to run npm start and npm run build using sudo, I'm assuming this isn't normal?

Thanks for your help, will let you know how I get on with the book!

Marnnn avatar Jan 05 '17 16:01 Marnnn

Only odd thing I'm experiencing is that I need to run npm start and npm run build using sudo, I'm assuming this isn't normal?

It's not.

gaearon avatar Jan 05 '17 16:01 gaearon

Sorry my bad, with all the node file deleting I think I ran create-react-app with sudo.

Thank you for the quick replies and I'll stop bothering you now!

Marnnn avatar Jan 05 '17 16:01 Marnnn

Glad it works!

gaearon avatar Jan 05 '17 16:01 gaearon