generator-gulp-angular icon indicating copy to clipboard operation
generator-gulp-angular copied to clipboard

Cannot find module 'phantomjs' on newly created app

Open ufoscout opened this issue 10 years ago • 2 comments

Hi all,

I created a new project with this generator v0.12.1, not touched any file, executed the following commands: npm install -> ok bower install -> ok gulp build -> ok gulp serve -> ok gulp test -> FAIL

here the error:

WARN [plugin]: Error during loading "karma-phantomjs-launcher" plugin:
  Cannot find module 'phantomjs'
WARN [watcher]: Pattern ".............../frontend/webapp/src/**/*.mock.js" does not match any file.
INFO [karma]: Karma v0.12.37 server started at http://localhost:9876/
WARN [launcher]: Can not load "PhantomJS", it is not registered!
  Perhaps you are missing some plugin?

My environment: Ubuntu 14.04 node 4.0.0 npm 3.3.3

ufoscout avatar Oct 10 '15 10:10 ufoscout

Adding phantomjs to the dev dependencies solves the issue:

npm install phantomjs --save-dev

Shouldn't it be included automatically during the generation of the project?

ufoscout avatar Oct 10 '15 10:10 ufoscout

Issue related to Karma, NPM3 and optional dep

zckrs avatar Oct 10 '15 10:10 zckrs