Open impguard opened 8 years ago
I had the same issue occur. Turns out it was because I had installed the gulp-imagemin
module on my host machine in a folder I was sharing with the container. I ended up deleting the node_modules
folder on my host machine and installing the modules inside the docker container instead, which fixed the error.
I got this message after enabling verbose log in npm. I don't if I should try to solve this on my dockers or if is a good idea inspect what happens when we try to spawn a curl process.
npm info lifecycle optipng-bin@3.0.3~postinstall: optipng-bin@3.0.3
> optipng-bin@3.0.3 postinstall /home/helllab/repository/myproject-dev/node_modules/optipng-bin
> node lib/install.js
#
# Fatal error in heap setup
# Allocation failed - process out of memory
#
Illegal instruction (core dumped)
npm verb lifecycle optipng-bin@3.0.3~postinstall: unsafe-perm in lifecycle true
npm verb lifecycle optipng-bin@3.0.3~postinstall: PATH: /usr/lib/node_modules/npm/bin/node-gyp-bin:/home/helllab/repository/myproject-dev/node_modules/optipng-bin/node_modules/.bin:/home/helllab/repository/myproject-dev/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
npm verb lifecycle optipng-bin@3.0.3~postinstall: CWD: /home/helllab/repository/myproject-dev/node_modules/optipng-bin
npm sill lifecycle optipng-bin@3.0.3~postinstall: Args: [ '-c', 'node lib/install.js' ]
npm sill lifecycle optipng-bin@3.0.3~postinstall: Returned: code: 132 signal: null
npm info lifecycle optipng-bin@3.0.3~postinstall: Failed to exec postinstall script
npm verb unlock done using /home/helllab/.npm/_locks/staging-c7f2061a851f975a.lock for /home/helllab/repository/myproject-dev/node_modules/.staging
Well, compile C code inside docker may be a bad idea. I will create a docker image with optipng-bin inside. It shoud solve the problem.
I was copying my project directory to the Docker container and received the same error. I fixed it by ignoring the optipng-bin
module in node_modules
.
Referencing #57.
This still seems to have a problem inside a Docker container. I'm running a debian docker container with the polymer starter kit which uses the gulp-imagemin plugin. This seems to fail with this output:
The various solutions pointed out in #57 seems to not fix the problem.