Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm 2.x + Docker = spawn .../mozjpeg/vendor/cjpeg ENOENT error #14

Closed
mikkotikkanen opened this issue Jul 13, 2016 · 1 comment
Closed

Comments

@mikkotikkanen
Copy link

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.

@shinnn
Copy link
Contributor

shinnn commented Jul 13, 2016

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.

@shinnn shinnn closed this as completed Jul 13, 2016
@imagemin imagemin locked and limited conversation to collaborators Jul 13, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants