google / web-starter-kit

Web Starter Kit - a workflow for multi-device websites
http://developers.google.com/web/starter-kit
Apache License 2.0
18.42k stars 3.01k forks source link

fsevents doesn't install on linux #796

Open garyterry opened 8 years ago

garyterry commented 8 years ago

Hi Guys, I have got the WSK and MDL working on my windows machine at work. Some minor things seem to not work (touch images not copied on gulp serve:dist) but it's most likely permission issues. Anyhow while trying to get wsk-0.6.0 working in Linux Mint 17.3 I've come across this:

~/dev.server/wsk-0.6.0 $ sudo npm install /home/dev.server/wsk-0.6.0 └── lodash@3.10.1 npm WARN optional Skipping failed optional dependency /chokidar/fsevents: npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.6

Which seems to be important... because it won't build as a result. I keep getting this error when I run gulp serve:dist (it doesn't serve properly any other way either):

~/dev.server/wsk-0.6.0 $ gulp serve:dist [13:57:31] Requiring external module babel-core/register /home/dev.server/wsk-0.6.0/gulpfile.babel.js:28 import fs from 'fs'; ^^^^^^ SyntaxError: Unexpected reserved word at exports.runInThisContext (vm.js:73:16) at Module._compile (module.js:443:25) at loader (/home/dev.server/wsk-0.6.0/node_modules/babel-register/lib/node.js:130:5) at Object.require.extensions.(anonymous function) as .js at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Module.require (module.js:365:17) at require (module.js:384:17) at Liftoff.handleArguments (/usr/local/lib/node_modules/gulp/bin/gulp.js:116:3) at Liftoff. (/usr/local/lib/node_modules/gulp/node_modules/liftoff/index.js:192:16)

I've tried uninstalling and reinstalling twice now... same error every time. Any suggestions? Thanks in advance...

rabbit210 commented 8 years ago

@garyterry Have the same issue. Did found any workaround?

borivojevic commented 8 years ago

@garyterry I don't see how your problem is related to fsevents. Make sure you have .babelrc file in the same directory as gulpfile.babel.js though.

devtip commented 8 years ago

@garyterry @rabbit210 As @borivojevic said, just make sure .babelrc file in the same directory as gulpfile.babel.js though.You should create a .babelrc file and paste this WSK .babelrc code[https://github.com/google/web-starter-kit/blob/master/.babelrc]. Now, my project is working! Enjoy :-(

garyterry commented 8 years ago

@borivojevic Those files are installed by the default installation... are they not? They are both present and correct. The fs events error now tells me my Linux OS isn't supported. Is this true? Haven't solved this one yet...

Florian-R commented 8 years ago

Fsevents is an optional dependency of Chokidar, it's only necessary for OSX, so this is unrelated.

felipecaputo commented 8 years ago

Same error here in Ubuntu 15.10

$ npm i babel-loader --save
react-stack@1.0.0 /home/felipe/src/pluralSight/react-stack
├── UNMET PEER DEPENDENCY babel-core@^6.0.0
└─┬ babel-loader@6.2.4 
  └── object-assign@4.0.1 

npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.9
npm WARN babel-loader@6.2.4 requires a peer of babel-core@^6.0.0 but none was installed.
npm WARN react-stack@1.0.0 No description
npm WARN react-stack@1.0.0 No repository field.
sergeysova commented 8 years ago

image

ubuntu 14.10

maicWorkGithub commented 7 years ago

npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.15: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

xWinGeD commented 7 years ago

maicWorkGithub: I have the same issue. Could you please tell me how you solved it?

maicWorkGithub commented 7 years ago

@xWinGeD I didn't...still wait the author to solve this.

PangastikaDian commented 7 years ago

@LestaD i have same errors. could you please tell me how you solved it ?

jingwang88 commented 7 years ago

image i have same errors!!

mujahidinside commented 7 years ago

npm

when i install angular2

git clone https://github.com/angular/quickstart.git quickstart cd quickstart npm install npm start

aadshalshihry commented 7 years ago

I have same error here. I am using Linux Mint 18.

npm WARN optional Skipping failed optional dependency /chokidar/fsevents: npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.15

PEZ commented 7 years ago

I get this when I npm install the CLI version of postcss with autoprefixer. It works on macos but not inside a Docker container.

sergeysova commented 7 years ago

@xWinGeD i'm not solved this

Garbee commented 7 years ago

There is nothing to solve here. It is an optional dependency and is only needed in MacOS environments. Linux and Windows both provide native ways to do what this dependency is needed for on MacOS.

ghost commented 7 years ago

Is it possible to ignore this particular info somehow, if it can't be solved? I see no reason why Linux and Windows users should be pestered with this annoying message on every package installation. Quite frankly, it's pretty annoying and unnecessary.

Garbee commented 7 years ago

I think --no-optional when installing will work, however that can have side-effects if other packages have optional deps that may be relied upon by accident. This is really something developers need to take up with Node so they can solve it better in NPM itself. The pestering is out of our control as this is caused by a package we depend upon needing the optional dependency.

ghost commented 7 years ago

Thank you, @Garbee. I'll try out --no-optional.

hegdeas commented 7 years ago

@odiumediae Please share your findings. if you get a chance to try the above?

ghost commented 7 years ago

@hegdeas It does work, as long as the setup is not too complicated (optional deps can become a problem, just as @Garbee mentioned), so it's not a suitable workaround, but the only one I know so far apart from ignoring the warning.

bolerap commented 7 years ago

Same problem, temporary solution for angular2 cli is ng new <project> --skip-install then run yarn install

germansokolov13 commented 7 years ago

I wonder if this message about wrong architecture may be changed to less startle developers then. They see the message and think that something is wrong though it may be fine.

Garbee commented 7 years ago

@germansokolov13 That's an issue for node (NPM) to handle. This error is generated by the NPM install process of the package based on the package's requirements. There is nothing that we can do about it on WSK.

BradGriffith commented 6 years ago

This is a late reply, but I had success with:

rm -rf node_modules package-lock.json yarn.lock
yarn install --no-optional

Before removing the lock files, I kept getting the same error with the --no-optional flag.

Little-Little-Monster commented 4 years ago

surprise https://lupeier.com/post/linux-npm-install-eacces/

allanist commented 4 years ago

optional Skipping failed optional dependency /chokidar/fsevents: npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.2.13 npm WARN js-starter-code@1.0.0 No repository field.

mcnaveen commented 3 years ago

rm -rf node_modules package-lock.json yarn.lock

yarn install --no-optional

Above commands helped me to fix it. Here is the Source