Installing phantomjs karma launcher in Ubuntu-Docker context Karma is a nodejs tool to automate browser testing. It seems that it depends on nodejs plugin fsevents.

But, fsevents is for processing Mac OS X events, therefore I get the error "not supported on your system" for the phantom karma launcher.

Questions I have found on GitHub seem to come from other Mac OS users dealing with upgrading npm.

My question is: how to install karma launcher in headless ubuntu/docker context?
Because fsevents is an optional dependency, the solution has been here:

npm install --no-optional karma-phantomjs-launcher