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'm trying to run my app inside Docker container. It has three services, but I have problems only with web-app service i.e. Vite-Vue app.
I tried to run application and got this error:
Then, I realized that this happen because of esbuild's binary file inside my node_modules. So, I deleted all modules from node_modules directory, created volume for this directory in docker compose and ran docker compose run web-app npm install to make sure that I have container's node_modules locally with esbuild module built for container's image.
It fixed the bug, Vite successfully runs in docker:
If you have first error, make sure to have container's node_modules installed locally with docker compose run web-app npm install and rerun command from second step
System Info
Output of npx envinfo --system --npmPackages vite,@vitejs/plugin-vue --binaries --browsers:
I have just fixed the issue, I'm not sure, but I think it was because I haven't properly mounted my node_modules.
Now my docker-compose.yml looks like this
Describe the bug
I'm trying to run my app inside Docker container. It has three services, but I have problems only with web-app service i.e. Vite-Vue app.
I tried to run application and got this error:
Then, I realized that this happen because of esbuild's binary file inside my node_modules. So, I deleted all modules from node_modules directory, created volume for this directory in docker compose and ran
docker compose run web-app npm install
to make sure that I have container's node_modules locally with esbuild module built for container's image.It fixed the bug, Vite successfully runs in docker:
But it doesn't recompile when I change source files even though I have volume mounted to docker container
package.json:
vite.config.js:
Dockerfile:
docker-compose.yml:
Reproduction
Github Repo
docker compose --env-file .env.development up
docker compose run web-app npm install
and rerun command from second stepSystem Info
Output of
npx envinfo --system --npmPackages vite,@vitejs/plugin-vue --binaries --browsers
:Used package manager: npm
Logs
The text was updated successfully, but these errors were encountered: