Gitlab CI build fails

Hello, I have a web application into two repositories, one for the front and one for the back, when i try to build my application with my docker runner and docker as an executor, my build fails both for the front and the back, because of npm install (my application is in full javascript with angular and nodejs). In the front it is because of node-sass and in the back it is because of phantomjs.

Here is the verbose mode for node sass :
npm info install node-sass@4.5.0
Binary found at /formation-front/node_modules/node-sass/vendor/linux-x64-51/binding.node
Testing binary
Binary is fine
npm verb lifecycle node-sass@3.13.1~postinstall: unsafe-perm in lifecycle false
npm verb lifecycle node-sass@3.13.1~postinstall: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/formation-front/node_modules/node-sass/node_modules/.bin:/formation-front/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
npm verb lifecycle node-sass@3.13.1~postinstall: CWD: /formation-front/node_modules/node-sass

Here is the output for phantomjs :
npm info lifecycle phantomjs-prebuilt@2.1.14~install: phantomjs-prebuilt@2.1.14

phantomjs-prebuilt@2.1.14 install /formation-back/node_modules/html-pdf/node_modules/phantomjs-prebuilt
node install.js

PhantomJS not found on PATH
Downloading https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-linux-x86_64.tar.bz2
Saving to /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
Receiving…
[==================================------] 84%
Received 22866K total.
Extracting tar contents (via spawned process)
Removing /formation-back/node_modules/html-pdf/node_modules/phantomjs-prebuilt/lib/phantom
Copying extracted folder /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1487801488764/phantomjs-2.1.1-linux-x86_64 -> /formation-back/node_modules/html-pdf/node_modules/phantomjs-prebuilt/lib/phantom
Writing location.js file
Done. Phantomjs binary available at /formation-back/node_modules/html-pdf/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs

1 Like

Seems like a path issue? Since the job is installing it its not in your path and cannot be ran with the default phantomjs command?

@Armays did you manage to solve the problem?

I’ve got something similar:

image: node:6
test:
  script:
  - cd $CI_PROJECT_DIR/web
  - npm -d install

That resulted in:

npm info lifecycle sass-graph@2.1.2~install: sass-graph@2.1.2
npm info lifecycle node-sass@4.5.0~install: node-sass@4.5.0

> node-sass@4.5.0 install /builds/arian/lessonplans/web/node_modules/node-sass
> node scripts/install.js



ERROR: Job failed: exit code 1
1 Like

I am also having a similar issue. Wondering if any one here has made any progress?