I have a Rails/webpack/Elm app working perfectly on OS X giving me huge headaches in my docker images. For some reasons the elm binary is corrupted/broken and I really have no idea what to do to fix this.
This is the output I have when docker-compose up
Here is my Dockerfile
and here various versions - elm 0.19, webpacker 4
I’ve tried all the typical stuff, from updating everything to deleting elm-stuff
One thing I had to take care of when using Docker with 0.19 was to make sure that my local elm-stuff does not get copied over to the container, by specifying it in .dockerignore. I was getting the error about “corrupted” packages, which echoes the title. However, I did not spot this error in the printout provided above, so it might not apply here.
I haven’t fully processed the setup to be able to debug further atm, but maybe someone else has had a similar setup and they know better
I would be tempted to create a docker container for the image, then open a shell inside it and check if elm is there at the location described in the error message. Is there some extra step you need to run to get elm installed?
It looks to me like the step you are expecting to install Elm is:
? But that would, if anything be a local install, not under /use/src/…
So, since npm does not host binaries, and Elm is not really a node package, we host the binaries on github releases and use a shim script to get everything into the right places at the right times. That error says that the final binary isn’t in the right place. There are two things I could see which would help us diagnose what’s going on here:
the log you get when running yarn install or npm install. Are there any errors? Do you have --ignore-scripts=true in any config or on the CLI? Just the log from RUN yarn install would be sufficient; and shouldn’t contain any proprietary information.
the tree structure as is actually laid out on disk. You could get it by running tree /usr/src/directory/node_modules/elm.