Medium / phantomjs

NPM wrapper for installing phantomjs
Other
1.42k stars 436 forks source link

install error on Docker node:argon #759

Open eczajk1 opened 6 years ago

eczajk1 commented 6 years ago

I have been getting an install error when trying to build my app in a Docker container:

Step 1/10 : FROM node:argon
argon: Pulling from library/node

Digest: sha256:028bf52f1b688828d550fef2d2bdc720f5c8fffdd54d8f1351dd20536a49f96f
Status: Downloaded newer image for node:argon
 ---> 30c3ad0e514f
Step 2/10 : RUN mkdir -p /usr/src/app
 ---> Running in 7862d41930ad
 ---> 222d21cc058c
Removing intermediate container 7862d41930ad
Step 3/10 : WORKDIR /usr/src/app
 ---> 4d4ab6cebd1f
Removing intermediate container f07311a4f5ed
Step 4/10 : COPY package.json /usr/src/app/
 ---> 7872b3e047c3
Removing intermediate container f59a2b9fab0f
Step 5/10 : RUN npm install --production
 ---> Running in fe3d7fe7dbf0
npm WARN deprecated npmconf@2.1.1: this package has been reintegrated into npm and is now out of date with respect to npm
npm WARN deprecated npmconf@2.0.9: this package has been reintegrated into npm and is now out of date with respect to npm
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead

> phantomjs-prebuilt@2.1.16 install /usr/src/app/node_modules/phantomjs-prebuilt
> node install.js

module.js:327
    throw err;
    ^

Error: Cannot find module 'fast-deep-equal'
    at Function.Module._resolveFilename (module.js:325:15)
    at Function.Module._load (module.js:276:25)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/usr/src/app/node_modules/request/node_modules/har-validator/node_modules/ajv/lib/compile/resolve.js:4:13)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)

> phantomjs@1.9.17 install /usr/src/app/node_modules/jsreport-phantom-pdf/node_modules/phantom-html-to-pdf/node_modules/phantomjs
> node install.js

Downloading https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-x86_64.tar.bz2
Saving to /usr/src/app/node_modules/jsreport-phantom-pdf/node_modules/phantom-html-to-pdf/node_modules/phantomjs/phantomjs/phantomjs-1.9.8-linux-x86_64.tar.bz2
Receiving...

Received 12854K total.
Extracting tar contents (via spawned process)
Removing /usr/src/app/node_modules/jsreport-phantom-pdf/node_modules/phantom-html-to-pdf/node_modules/phantomjs/lib/phantom
Copying extracted folder /usr/src/app/node_modules/jsreport-phantom-pdf/node_modules/phantom-html-to-pdf/node_modules/phantomjs/phantomjs/phantomjs-1.9.8-linux-x86_64.tar.bz2-extract-1511362095790/phantomjs-1.9.8-linux-x86_64 -> /usr/src/app/node_modules/jsreport-phantom-pdf/node_modules/phantom-html-to-pdf/node_modules/phantomjs/lib/phantom
Writing location.js file
Done. Phantomjs binary available at /usr/src/app/node_modules/jsreport-phantom-pdf/node_modules/phantom-html-to-pdf/node_modules/phantomjs/lib/phantom/bin/phantomjs

> phantomjs@1.9.15 install /usr/src/app/node_modules/jsreport-phantom-pdf/node_modules/phantom-html-to-pdf/node_modules/phantom-workers/node_modules/phantomjs
> node install.js

Downloading https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-x86_64.tar.bz2
Saving to /usr/src/app/node_modules/jsreport-phantom-pdf/node_modules/phantom-html-to-pdf/node_modules/phantom-workers/node_modules/phantomjs/phantomjs/phantomjs-1.9.8-linux-x86_64.tar.bz2
Receiving...

Received 12854K total.
Extracting tar contents (via spawned process)
Removing /usr/src/app/node_modules/jsreport-phantom-pdf/node_modules/phantom-html-to-pdf/node_modules/phantom-workers/node_modules/phantomjs/lib/phantom
Copying extracted folder /usr/src/app/node_modules/jsreport-phantom-pdf/node_modules/phantom-html-to-pdf/node_modules/phantom-workers/node_modules/phantomjs/phantomjs/phantomjs-1.9.8-linux-x86_64.tar.bz2-extract-1511362099900/phantomjs-1.9.8-linux-x86_64 -> /usr/src/app/node_modules/jsreport-phantom-pdf/node_modules/phantom-html-to-pdf/node_modules/phantom-workers/node_modules/phantomjs/lib/phantom
Writing location.js file
Done. Phantomjs binary available at /usr/src/app/node_modules/jsreport-phantom-pdf/node_modules/phantom-html-to-pdf/node_modules/phantom-workers/node_modules/phantomjs/lib/phantom/bin/phantomjs
npm ERR! Linux 4.4.0-53-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--production"
npm ERR! node v4.8.6
npm ERR! npm  v2.15.11
npm ERR! code ELIFECYCLE

npm ERR! phantomjs-prebuilt@2.1.16 install: `node install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the phantomjs-prebuilt@2.1.16 install script 'node install.js'.
npm ERR! This is most likely a problem with the phantomjs-prebuilt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs phantomjs-prebuilt
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! 
npm ERR!     npm owner ls phantomjs-prebuilt
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /usr/src/app/npm-debug.log

Dockerfile:

FROM node:argon

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

COPY package.json /usr/src/app/
RUN npm install --production
COPY . /usr/src/app

EXPOSE 3800

CMD [ "npm", "start"]