4

Hy... I'm trying to install webpack on windows 7 x64 by running this command :

npm install webpack -g

But then the my command prompt gave an error said "npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.14"... I have been reading a loot sources on internet about this issue, for example : installing windows package, using npm init bla bla, using npm shrinkwrap bla bla, deleting node-module directory and start initiializing it again, changing the node.js version, and so on... but seems none of them suit me well...So is there any other way that I can try...??? Thank you so much... :) I really apreciate your answer here.. :)

Maryadi Poipo
  • 1,418
  • 8
  • 31
  • 54

2 Answers2

14

Actually, the problem here is the HTTP fetch. Try using

npm install --no-optional.

It will work.You can read more about this here

Lav Vishwakarma
  • 1,380
  • 14
  • 22
  • 1
    Thank you... I have solved that, but there are so many errors in my webpack.server.js...I need to post question again about that... Thanks again Mr. @Lav Kumar.. :) – Maryadi Poipo Aug 04 '16 at 18:04
  • 1
    The --no-optional argument will prevent optional dependencies from being installed. – mruanova Jun 29 '18 at 14:40
0

I was facing this issue with CI workflow script and even "--no-optional" was not working with ci

npm ci --no-optional

The above command only worked when I added the optional package as

"optionalDependencies": {
    "fsevents": "^2.3.2"
}

in the package.json file