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
[vite-node] [ERR_LOAD_URL] ..vue error in dev mode (Docker only) #20446
Comments
What a coincidence. Just 3 hrs ago tried to run nuxt3 development in docker and see exact same error. Still fighting... |
Ok, I managed to run it in docker by downgrading nuxt to 4.3.1 version in package.json. |
@danielroe can you & team please take a look at this and include fix in v3.4.3 if possible 🙏 This is upgrade blocker for teams who use docker |
cc: @antfu |
エラーが出るため暫定対策 nuxt/nuxt#20446 [vite-node] [ERR_LOAD_URL] ..vue error in dev mode
"devDependencies": {
...
"nuxt": "~3.3.2"
} use --force option (ignore yarn dev --force |
@antfu Can you please take a look at this? This is a blocker for updating Nuxt. |
I am not familiar with Docker, and I need sometime to set it up |
Ah. Is there any way I can help with debugging? This error is super not informative. |
The bug is: on defaultTemplates resolve in generateApp it inserts But when I try to import it, Vite fails, it works fine without Docker and breaks inside. File does exist in filesystem. I don't think I can go much deeper, I think there is a bug in resolving somewhere inside... |
Well, I decided to go deep. Found a workaround: change /app to any random folder (ex. /frontend) in Dockerfile WORKDIR e.t.c. Something is going on with /app/app.vue path... |
I've spent hours on this and I give up (at least for today). My conclusion: it looks so much like Vite 3.4.0 bug. I downgraded vite-node version and it worked just fine, also my other project on Nuxt 3.4.1 uses same vite-node version. I have reviewed all Nuxt 3.4.2. diff and didn't find anything. I have also downgraded Vite version to 4.2.2, removed some not compatible code and it worked just fine without any errors. If I will be able to reproduce this in pure vite environment, I'll report an issue to them and close this. Would appreciate help with this since I dont't know the internals well... |
Solved for me. Very weird. |
Still happening in |
Same error for me in a node:18 docker container with a fresh install with Nuxt 3.5.2 and using /app as the WORKDIR. Using any other folder than /app as the WORKDIR "solves" it. |
How did you figure that out? Totally fixed my issue. |
I didn't, daniluk4000 did and shared it earlier in the thread. :) |
Well if you're curious... First I've tried to find problem in Nuxt, debugged it and found out the problem is somewhere inside "import" and Nuxt seems to do everything correctly. Then, I've tried to debug vite-node and figured out the problem is somewhere inside Vite. During debug, I saw that /app/app.vue is being replaced to /app.vue somewhere inside Vite. I thought it can't be just coindidence and changed /app to /frontend. When it worked on both hello world and my real project, I've stopped debugging (except for pure Vite check) and posted workaround here. Sadly, I don't have time & expertise to debug Vite with Nuxt configuration. My best guess is something in Nuxt's Vite configuration got broken after Vite 4.3.0 (probably on Vite side), but I couldn't go much far. |
+1 |
1 similar comment
+1 |
+1 using Docker on Kubernetes having the same issue. Moving from /app to /nuxt worked for me. |
I'm having the same issue right now. ├── @invictus.codes/nuxt-vuetify@0.3.0 My sources are public: https://github.com/rock-the-prototype/nuxt-the-prototype/ The error occurred only after today's changes. Does't this look like a problem that could indicate a collision between Vite and Vuetify? So it could be that there is an incompatibility or conflict between the versions of Vite, Vuetify, or Nuxt. It is possible that one of the dependencies is not resolved properly or that there is difficulty integrating the different build tools. |
fix: remove duplicate nuxt version
Thank you! Looks to be a nuxt bug. Finally running nuxt inside podman inside code-server inside kubernetes inside alpine os virtual machine inside windows 10 |
this will be resolved in vite v5. |
I changed from ^3.10.2 to ~3.3.2 appreciate it that u gave me this nuxt version it fixed this issue for me. |
@wrode The same thing is happening with my nuxt project, I have been trying to overcome this problem for the second day. I've seen comments that this is solved by upgrading the nuxt version to newer ones, but in my case it doesn't work. Please let us know if you find a solution |
Environment
Reproduction
https://github.com/daniluk4000/nuxt-3.4.2-docker-error
Please read Readme.md in this repo before you launch it.
Describe the bug
The only thing I did - executed nuxi upgrade to upgrade from 3.4.1 to 3.4.2, then I've started to face this error when I launch project (dev mode only)
I've tried to clear .nuxt folders and do clean startup, but had no success.
Reproduction repo is simply "npx nuxi@latest init" with a bit of changes for Dockerization.
Additional context
I wasn't able to reproduce this error outside of Docker environment.
Workaround
Change WORKDIR from /app to any random folder, ex. /frontend
The text was updated successfully, but these errors were encountered: