프론트엔드 개발 놀이터/etc
[casperjs] 윈도우 환경 실행시 did you install phantomj
내나라
2020. 10. 13. 17:59
윈도우 환경에서 casperjs를 실행시켰을때
casperjs did you install phantomj? 라는 에러메세지가 나오는 경우가 있다.
이럴 경우 환경변수에 아래와 같이 추가해주면 이상없이 동작한다.
PHANTOMJS_EXECUTABLE=설치위치/bin/phantomjs.exe
나의경우 이렇게 추가했다.
PHANTOMJS_EXECUTABLE = C:\Users\USER\AppData\Roaming\npm\node_modules\phantomjs\lib\phantom\bin\phantomjs.exe
명령프롬프트 화면에서 아래와 같이 입력하면 정상적으로 테스트가 실행되어야 한다.
casperjs selftest