Closed brett--anderson closed 7 years ago
Does this happen all the time? npm install reporta any error? The automated build of a Docker image works ok.
Hi, thanks for responding :) It happens every time. npm installs everything, but there is one error thrown which I described in #546 . I've recreated the error using the files I described above on two different computers.
If you clone this repository and then build the Dockerfile, do you get the same error I'm seeing in #546 ?
are you on windows?
try adding a .dockerignore
file in your folder with this content node_modules
I'm on OSX. When I get the error described in #546 I'm using an exact clone of this repository, which includes the .dockerignore
file. I tried adding the file to the simple container described above and now I'm getting a different error. I'll update this question after I investigate a little more.
That seems to have solved the problem! Thanks so much for your help! If you have a moment, can you tell me why that .dockerignore file solved the problem, or point me in the direction of a blog that explains why?
Something did not go well during npm install on your box, and you were uploading the bad dependencies when you were running docker build
.
Please see issue #546 first as it may be causing the issue documented here. I have a simple Mosca application. I'm running it inside a Dockerfile like this:
I'm building the image then using it with the command:
I have a package.json file that looks like this:
And app.js looks like this:
When I execute
node app.js
in the container I get the following error:I'd appreciate any help with this.