How to install PhantomJS during Pipeline configuration?


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
- mkdir -p $PHANTOMJS_PATH
- wget -q$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?


0 answers

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

1,768 views 1 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you