kosmas58 / pia-docker

Killian Kemps (https://github.com/KillianKemps) has created an awesome Docker configuration to setup a Docker environment for production purpose. Thanks to Killian it is much easier now to run PIA. A simple docker-compose up does everything and gives a running website : front-end, back-end and database.
GNU General Public License v3.0
38 stars 35 forks source link

saveSvgAsPng.js missing #4

Closed GhostRock37 closed 6 years ago

GhostRock37 commented 6 years ago

I had a problem when building with docker: for PIA FRONT, a library appeared missing:

An error occured during the build:
Error: ENOENT: no such file or directory, open '/var/www/pia/node_modules/save-svg-as-png/saveSvgAsPng.js'
ENOENT: no such file or directory, open '/var/www/pia/node_modules/save-svg-as-png/saveSvgAsPng.js'
Error: ENOENT: no such file or directory, open '/var/www/pia/node_modules/save-svg-as-png/saveSvgAsPng.js'
ERROR: Service 'cnil-pia-front' failed to build: The command '/bin/sh -c npm install  && cp src/environments/environment.prod.ts.example src/environments/environment.prod.ts  && sed -i -e "s/version: ''/version: '$PIA_VERSION'/g" src/environments/environment.prod.ts  && /var/www/pia/node_modules/@angular/cli/bin/ng build --prod --build-optimizer --sourcemaps' returned a non-zero code: 1

I had to copy saveSvgAsPng.js manually from /var/lib/docker/overlay2/l/XVUEUD2R34B5445PIEWT5WW6TJ/var/www/pia/node_modules/save-svg-as-png/lib/ to /var/lib/docker/overlay2/l/XVUEUD2R34B5445PIEWT5WW6TJ/var/www/pia/node_modules/save-svg-as-png/,

and the rest went well!

thank you

kosmas58 commented 6 years ago

I can reproduce the problem. I have to look for the cause. Maybe it takes a while, because I'm on vacation for the next three weeks.

kosmas58 commented 6 years ago

I've found the cause: In .angular-cli.json stands in line 35: "../node_modules/save-svg-as-png/saveSvgAsPng.js",

So I have to rework the docker configuration to use yarn instead of npm.

kosmas58 commented 6 years ago

Added yarn. It's working again.