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
I noticed this building a Vue project using Vite in a docker image. If the source tree is a layer below the docker file the following error will occur:
#12 0.836 > docker-error@0.0.0 build
#12 0.836 > vue-tsc --noEmit && vite build
#12 0.836
#12 12.94 failed to load config from /src/subdir/vite.config.ts
#12 12.94 error during build:
#12 12.94 Error: The service was stopped
#12 12.94 at /src/subdir/node_modules/esbuild/lib/main.js:1014:31
#12 12.94 at /src/subdir/node_modules/esbuild/lib/main.js:568:9
#12 12.94 at Socket.afterClose (/src/subdir/node_modules/esbuild/lib/main.js:546:7)
#12 12.94 at Socket.emit (node:events:381:22)
#12 12.94 at endReadableNT (node:internal/streams/readable:1307:12)
#12 12.94 at processTicksAndRejections (node:internal/process/task_queues:81:21)
#12 12.95 npm notice
#12 12.95 npm notice New minor version of npm available! 7.7.6 -> 7.10.0
#12 12.95 npm notice Changelog: <https://github.com/npm/cli/releases/tag/v7.10.0>
#12 12.95 npm notice Run `npm install -g npm@7.10.0` to update!
#12 12.95 npm notice
This can fixed adding RUN node node_modules/esbuild/install.js before the build line in the Dockerfile.
Sorry, I don't use Docker myself. Can you say what the problem is? Is the executable not being installed on the file system with npm install? Or is it that the executable is present but for the wrong architecture somehow?
One thing that can prevent the executable from being installed is if the ignore-scripts npm setting is set to true, since then the install script isn't run. That could be something to check.
Another thing to check would be the logs before this point since if esbuild failed to install correctly, the failure should show up in the installation log.
After getting some sleep I looked at this clear eyed.
There was a bug in the glob expression of the .dockerignore that was pulling in the node_modules directory from Windows into the Linux image. I assume it was also pulling in the windows binary, which also explains why running the install script again fixed it.
This isn't a bug on your side of things, sorry for the confusion.
This is an edge case for sure.
I noticed this building a Vue project using Vite in a docker image. If the source tree is a layer below the docker file the following error will occur:
This can fixed adding
RUN node node_modules/esbuild/install.js
before the build line in the Dockerfile.Fully reproducible example is here: https://github.com/JonathanHopeDMRC/docker-error. Just run
docker build .
.Thanks,
Jonathan
The text was updated successfully, but these errors were encountered: