saikat / react-apollo-starter-kit

A production-ready starter kit for making a React/Apollo application.
MIT License
186 stars 28 forks source link

Darwin required #14

Open KristerV opened 8 years ago

KristerV commented 8 years ago

Apparently my Arch Linux is not compatible with this setup? Couldn't find any reference of darwin anywhere..

npm ERR! Linux 4.7.6-1-ARCH
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "i"
npm ERR! node v7.0.0
npm ERR! npm  v3.10.9
npm ERR! code EBADPLATFORM

npm ERR! notsup Unsupported platform for fsevents@1.0.14: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! notsup Valid OS:    darwin
npm ERR! notsup Valid Arch:  any
npm ERR! notsup Actual OS:   linux
npm ERR! notsup Actual Arch: x64

npm ERR! Please include the following file with any support request:
npm ERR!     /home/krister/code/markdownsites-apollo/npm-debug.log
KristerV commented 8 years ago

seems like there's a fix for this in npm 4.

KristerV commented 8 years ago

okay, whatever. got passed this by using yarn install. I'll leave this open just in case you (the owner of this repo) want to elaborate somehow.

saikat commented 7 years ago

Ok thanks for the report. I'll try to replicate on a VM.

valpet commented 7 years ago

I got something similar, but I'm on Windows 10, using Node 7.2.0 and NPM 3.10.9.

npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v7.2.0
npm ERR! npm  v3.10.9
npm ERR! code EBADPLATFORM

npm ERR! notsup Unsupported platform for fsevents@1.0.14: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! notsup Valid OS:    darwin
npm ERR! notsup Valid Arch:  any
npm ERR! notsup Actual OS:   win32
npm ERR! notsup Actual Arch: x64
valpet commented 7 years ago

Updated npm to 4.0.3 and still get

npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\peter\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v7.2.0
npm ERR! npm  v4.0.3
npm ERR! code EBADPLATFORM

npm ERR! notsup Unsupported platform for fsevents@1.0.14: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! notsup Valid OS:    darwin
npm ERR! notsup Valid Arch:  any
npm ERR! notsup Actual OS:   win32
npm ERR! notsup Actual Arch: x64
saikat commented 7 years ago

I should have access to a linux environment in a couple weeks (sorry it's going to take a while). Any luck trying to debug this? It seems like the issue is specifically with fsevents.

jmcclell commented 7 years ago

@saikat If you are doing your npm shrinkwrap on your Macbook, you're inadvertantly locking Darwin-specific fsevents package(s) which are normally conditional when doing a non-shrinkwarpped npm install.

I've run into this issue before. I do not know of a good solution for being able to support both platforms while still being able to shrinkwrap.

jmcclell commented 7 years ago

@KristerV @valpet https://github.com/npm/npm/issues/2679

The behavior of shrinkwrap installs is just terrible. If @saikat shrinkwraps from his Macbook, it will shrinkwrap everything in node_modules even if they were optional deps in some package.json somewhere. If you look at the shrinkwrap file, you'll see fsevents which is usually included as an optional dep for any package that has a --watch method. On a normal npm install it will only install it if your architecture is appropriate, but shrinkwrapped installs ignore this entirely. It's been broken in this way since the day optional deps were introduced alongside shrinkwrap.

Since this is a boilerplate, you could just nuke the shrinkwrap file and do a normal npm install and hope you don't run into any crappy version changes with breaking changes. Or, you can lock them down in package.json to specific versions.