2016-03-02 103 views
1

everyone!SLIMERJSLAUNCHER環境變量缺失。將它設置爲Firefox或XulRunner的路徑

當我試圖運行卡斯帕一個測試: casperjs --engine=slimerjs test.js

,並得到這條消息

SLIMERJSLAUNCHER environment variable is missing. Set it with the path to Firefox or XulRunner

安裝的XULrunner,Firefox瀏覽器。我正在使用Mac OS。

+0

'export SLIMERJSLAUNCHER =/Applications/Firefox.app/Contents/MacOS/firefox' does not help – HappyCoder888

回答

0

解決的辦法是:

  1. 卸載當前slimerjs brew uninstall slimerjs
  2. 創造的git克隆一個目錄mkdir ~/forked && cd $_
  3. 克隆slimerjs回購git clone https://github.com/laurentj/slimerjs.git
  4. 出口路徑export PATH=$PATH:~/forked/slimerjs/src

和NEX t重啓終端,因爲對我來說,它不工作,直到我重新啓動。

選中此我們通過輸入slimerjs -v

幸福給大家。