6

Hello i'am trying to install fsevents whitch npm. Therefore i use the following versions:

  • Node : 4.2.6

  • NPM : 3.5.2

  • OS : Ubuntu 16.04 LTS

    i 'am executing the statement

Edited

npm install fsevents --no-optional --save react-redux

after executing i get the following errors back in the console

Edited

npm ERR! Linux 4.4.0-45-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "fsevents" "--no-
optional" "--save" "react-redux"
npm ERR! node v4.2.6
npm ERR! npm  v3.5.2
npm ERR! code EBADPLATFORM

npm ERR! notsup Not compatible with your operating system or  
architecture: fsevents@1.0.15
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/erik/git/test/npm-debug.log

Please can you help fix this problem.

Manny thanks

Erik

Community
  • 1
  • 1
Erik hoeven
  • 870
  • 3
  • 13
  • 32
  • 3
    The error is pretty clear... it doesn't support Linux. `Not compatible with your operating system or architecture: fsevents@1.0.15` – Joe Clay Nov 18 '16 at 12:22
  • To expand on @JoeClay's comment, `fsevents` is a mac-only file watching package. – RyanZim Nov 18 '16 at 12:36
  • 1
    ??? Same porblem, but the answer do not help. We see that npm install OSX package on Ubuntu OS. The question is why and how to fix this ? – Hanske1967 Nov 29 '16 at 22:42
  • How can one exclude optional dependency `fsevents` from from an `npm install`? – Derek Mahar Dec 13 '16 at 21:20

2 Answers2

4

The comments above tell you what you already know. Perhaps you should've phrased this as a question. :-)

Assuming the question is how to prevent fserrors on a non-Mac system, the solution I found is this:

Remove fserrors from your package.json and remove the folder.

rm -r ./node_modules/fserrors

Then run:

npm rebuild

Problem solved.

texelate
  • 2,157
  • 3
  • 19
  • 30
  • 4
    I do not see any `/node_modules/fserrors` in my setup. Also, my package.json does not contain `fserrors`. How do I get it resolved? – Sandeepan Nath Oct 25 '17 at 09:28
  • Asked a new question https://stackoverflow.com/questions/46929196/how-to-solve-npm-install-throwing-fsevents-warning-on-non-mac-os – Sandeepan Nath Oct 25 '17 at 10:27
0

I added the following to my package.json file:

"optionalDependencies": {
  "fsevents": "2.1.2"
},

Then run npm rebuild (or wait for the next time you need the npm command) and the warning is gone.

matthiku
  • 2,640
  • 1
  • 12
  • 21