webssh2: Not compatible with your operating system or architecture: fsevents@1.2.4

npm WARN optional Skipping failed optional dependency /chokidar/fsevents: npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.2.4 npm ERR! Linux 4.4.0-124-generic npm ERR! argv “/usr/bin/nodejs” “/usr/bin/npm” “install” npm ERR! node v4.2.6 npm ERR! npm v3.5.2 npm ERR! file sh npm ERR! code ELIFECYCLE npm ERR! errno ENOENT npm ERR! syscall spawn

npm ERR! uglifyjs-webpack-plugin@0.4.6 postinstall: node lib/post_install.js npm ERR! spawn ENOENT npm ERR! npm ERR! Failed at the uglifyjs-webpack-plugin@0.4.6 postinstall script ‘node lib/post_install.js’. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the uglifyjs-webpack-plugin package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node lib/post_install.js npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs uglifyjs-webpack-plugin npm ERR! Or if that isn’t available, you can get their info via: npm ERR! npm owner ls uglifyjs-webpack-plugin npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /media/data/appl/WebSSH2/npm-debug.log

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 33 (10 by maintainers)

Most upvoted comments

I get the same error running npm install --production and running the argument --no-optional for npm DID remove the errors, although when I try to run webpack it still says webpack is not installed

EDIT: FINALLY GOT IT WORKING

Problem: Running an old version of node

Solution: Updating node (I used nvm)

sudo apt-get update  
sudo apt-get install build-essential checkinstall libssl-dev

Then run

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.1/install.sh | bash

Then restart terminal and check node versions available with

nvm ls-remote

Find the most recent node and install it with

nvm install #.#.#

example: nvm install 12.9.0

You can safely ignore this message, it has been popping in lots of projects lately. The chokidar module has an optional dependency on fsevents which works only on OS X. All projects depending on chokidar will display this warning message when updating node_modules on a non OS X target.

In the next examples, instead of installing different versions of node, I’m running node in docker. I’m also using the master from today.

I ran the following commands and they were successful:

rm -rf node_modules && docker run -it --rm -v `pwd`:/app -w /app node:8.11 npm install --production
rm -rf node_modules && docker run -it --rm -v `pwd`:/app -w /app node:6.14 npm install --production
rm -rf node_modules && docker run -it --rm -v `pwd`:/app -w /app appsvc/node:4.8.4_1710252240 npm install --production
rm -rf node_modules && docker run -it --rm -v `pwd`:/app -w /app appsvc/node:4.4.7_1710252240 npm install --production
rm -rf node_modules && docker run -it --rm -v `pwd`:/app -w /app node:8.11-alpine npm install --production

In all examples above, I’m running with --production flag, as well I’m cleaning up the node_modules folder.

In the following tests, install generated warning but application started successfully.

rm -rf node_modules && docker run -it --rm -v `pwd`:/app -w /app node:8.11-alpine sh -c 'npm install && npm start'
rm -rf node_modules && docker run -it --rm -v `pwd`:/app -w /app node:8.11 sh -c 'npm install && npm start'
rm -rf node_modules && docker run -it --rm -v `pwd`:/app -w /app node:6.14-alpine sh -c 'npm install && npm start'
rm -rf node_modules && docker run -it --rm -v `pwd`:/app -w /app node:6.14 sh -c 'npm install && npm start'
rm -rf node_modules && docker run -it --rm -v `pwd`:/app -w /app iron/node:5.10.1-dev sh -c 'npm install && npm start'

The warning:

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

With the following test:

rm -rf node_modules && docker run -it --rm -v `pwd`:/app -w /app iron/node:4.2.6-dev sh -c 'npm install && npm start'

Installation succeeded with the warning above, but starting failed with:

WebSSH2 service reading config from: /app/config.json
/app/node_modules/read-config/lib/load/merge-configs.js:7
    return merge({}, ...configs, (a, b) => {

So I can suggest:

  • Read the message - warnings are ok, it’s just a warning.
  • If you are not developer, use npm install --production
  • Use node 6+!! Consider upgrading your node version - 8.11 is way faster than 6.14
  • If you are developer, try installing a C compiler - I believe that fsevents get’s compiled if not found for your OS/CPU.

Same for me… Just switched to ubuntu 18 and get this, when trying to install Bootstrap 4


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

Having the same problem, waiting if there is a resolution