You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running imagemin-mozjpeg in Docker (I suspect any linux) with npm 2.x spawn ../imagemin-mozpeg/node_modules/mozjpeg/vendor/cjpeg ENOENT error is produced.
Quickly looking at this it looks like something like this happens:
With npm 2.x it tries to look for the vendor directory under ../imagemin-mozjpeg/node_modules/mozjpeg, which for some reason or not is not there. However, when switching to npm 3.x, it looks for the mozjpeg directly under main node_modules, where the vendor directory does exist.
The text was updated successfully, but these errors were encountered:
You've already obtained the answer. When you just mount all built files to the Docker container instead of rebuilding the app inside the container, you should use the same version of npm CLI on both Docker container and your local machine.
When running imagemin-mozjpeg in Docker (I suspect any linux) with npm 2.x
spawn ../imagemin-mozpeg/node_modules/mozjpeg/vendor/cjpeg ENOENT
error is produced.Quickly looking at this it looks like something like this happens:
With npm 2.x it tries to look for the vendor directory under
../imagemin-mozjpeg/node_modules/mozjpeg
, which for some reason or not is not there. However, when switching to npm 3.x, it looks for the mozjpeg directly under main node_modules, where the vendor directory does exist.The text was updated successfully, but these errors were encountered: