I am trying to run tests on Centos 7 within the Node.js (6.1.0) environment. After I run
./node_modules/karma/bin/karma --log-level debug start
I get the error message:
Error during loading "karma-phantomjs-launcher" plugin:
Path must be a string. Received null
In karma.conf.js I have mentioned plugins and the browser:
'plugins': ['karma-mocha', 'karma-chai', 'karma-sinon', 'karma-chai-sinon', 'karma-coverage', 'karma-jasmine', 'karma-phantomjs-launcher', 'karma-chrome-launcher', 'karma-babel-preprocessor'],
browsers: ['PhantomJS'],
I also have installed all plugins locally for the project. All other plugins are loaded without a problem.
I have also the same project running on Windows 7 environment without a problem.
Removing the node_modules
directory and re-installing npm
packages again helped me:
rm -r node_modules/
or with rimraf
:
rimraf node_modules/
and re-adding all dependencies:
npm i
Since we weren't using phantomjs
for testing, I was able to resolve the issue by removing "karma-phantomjs-launcher"
from the karma.conf.js
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With