Open issue-up[bot] opened 11 months ago
any news here? facing the same problem serving over docker container on a domain in a sub-path like:
This is awkward, I've just spent a month upgrading a site to vue/nuxt 3 to find out I can't ship it to subfolders on netlify.
edit: I've written a node script that runs post build to dump everything in the folder where the routes think it is.
This was a supported feature in Nuxt 2. Same as @gavmck, we're at the end of a 6 month dev phase to find out Nuxt 3 is not supported anymore in a subfolder on netlify?
baseUrl
is not supported for netlify.@gavmck can you maybe share your node script that you used on netlify? And where/how do you run this?
### Environment ------------------------------ - Operating System: Darwin - Node Version: v20.2.0 - Nuxt Version: 3.6.3 - Nitro Version: 2.5.2 - Package Manager: npm@9.6.6 - Builder: vite - User Config: app, devtools - Runtime Modules: - - Build Modules: - ------------------------------ ### Reproduction **Works with dev OR build & preview:** https://stackblitz.com/github/michaelvcolianna/nuxttest?file=nuxt.config.ts **Deploy, not working:** https://sparkling-mandazi-64484f.netlify.app/test **Repo:** https://github.com/michaelvcolianna/nuxttest Edited to add a URL using `npm run generate` to illustrate the 404s: https://nuxt.mvcdev.net/ ### Describe the bug This feels like this is a Nuxt configuration thing. I guess it could be Netlify but wanted to check here first. I'm experiencing an error similar to https://github.com/nuxt/nuxt/issues/14817, but `npm run build && npm run preview` work fine locally and on Stackblitz. When deployed, though, either on Netlify or using `npm run generate` and serving the dist folder, an error shows up. This is because the files don't exist. When building, the baseURL ("test" for now) is appended before the "_nuxt" part of the resource. The Netlify deployment is looking for https://sparkling-mandazi-64484f.netlify.app/test/_nuxt/entry.624150a5.js, which is the MIME error because of the catchall serving it as a real page. It _should_ be looking for https://sparkling-mandazi-64484f.netlify.app/_nuxt/entry.624150a5.js. Serving from dist is looking for `localhost:8081/test/_nuxt/entry.a65c34ed.js`, which is a 404 since the SSG crawler doesn't create the file. It _should_ be looking for `localhost:8081/_nuxt/entry.a65c34ed.js`. (I know those file names aren't set in stone but hopefully they get the point across.) ### Additional context First, this issue happened prior to using the catchall. I tried a base Nuxt instance with the app.vue file, then converted that to use `