How to install PhantomJS during Pipeline configuration?

Leandro Soler September 19, 2017

Hi,

I'm having a problem installing PhantomJS during the build:

PhantomJS not found on PATH
Phantom installation failed TypeError: Path must be a string. Received undefined at assertPath (path.js:28:11) at Object.join (path.js:1232:7) at findSuitableTempDirectory (/opt/atlassian/pipelines/agent/build/node_modules/phantomjs/install.js:127:30) at /opt/atlassian/pipelines/agent/build/node_modules/phantomjs/install.js:476:19 at nextTickCallback (/opt/atlassian/pipelines/agent/build/node_modules/kew/kew.js:47:28) at _combinedTickCallback (internal/process/next_tick.js:95:7)

The way I'm doing it is:

 - export PHANTOMJS_VERSION=2.1.1
- export PHANTOMJS_PATH=/opt/phantomjs
- export PATH=$PHANTOMJS_PATH/:$PATH
- mkdir -p $PHANTOMJS_PATH
- wget -q https://github.com/Medium/phantomjs/releases/download/v$PHANTOMJS_VERSION/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 -O /tmp/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2
- tar -xf /tmp/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 -C $PHANTOMJS_PATH/
- rm /tmp/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2
- yarn install
- yarn test

Is there anything else I should do? Is there any restriction?

Thanks

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events