无法在Karma中安装phantomJS [英] Cannot install phantomJS in Karma

查看:190
本文介绍了无法在Karma中安装phantomJS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  WARN [config]:config.configure()已弃用,请改用config.set()。 
WARN [插件]:找不到插件karma-phantomjs。
你忘了安装它吗?
npm安装karma-phantomjs --save-dev
INFO [karma]:Karma v0.10.2服务器在http:// localhost:9018 /
处启动WARN [launcher]:无法加载PhantomJS,它没有注册!
也许你错过了一些插件?

获取此错误。当运行npm install karma-phantomjs --save-dev时,我收到一个错误消息。

  npm ERR! 404'karma-phantomjs'不在npm注册表中。 

我安装了karma-phantomjs-launcher --save-dev,但运行grunt时仍然出现错误观看。



其他人遇到这个问题?

解决方案

After一些研究让我意识到我需要运行:

pre $ $ $ $ c $ npm install -g karma @ canary phantomjs karma-phantomjs-launcher

运行后,我回到了我的karma-unit.tpl.js文件,而不是karma-phantomjs,我把它改成了karma-phantomjs-launcher。

现在当我执行一个像grunt build这样的命令时,我不会在phantomJS中发现错误


WARN [config]: config.configure() is deprecated, please use config.set() instead.
WARN [plugin]: Cannot find plugin "karma-phantomjs".
  Did you forget to install it ?
  npm install karma-phantomjs --save-dev
INFO [karma]: Karma v0.10.2 server started at http://localhost:9018/
WARN [launcher]: Can not load "PhantomJS", it is not registered!
  Perhaps you are missing some plugin?

Getting this error. When running npm install karma-phantomjs --save-dev I get an error.

npm ERR! 404 'karma-phantomjs' is not in the npm registry.

I installed karma-phantomjs-launcher --save-dev but i still get an error when running grunt watch.

Anyone else run into this issue?

解决方案

After some research I realized that I needed to run:

npm install -g karma@canary phantomjs karma-phantomjs-launcher

Once I ran that I went back into my karma-unit.tpl.js file and instead of karma-phantomjs, I changed this to karma-phantomjs-launcher.

Now when I execute a command like grunt build, I get no error regarding phantomJS

这篇关于无法在Karma中安装phantomJS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆