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
Getting "Multiple conflicting contents for sourcemap source" when trying to build app with rc.10 #14981
Comments
Would you provide a reproduction? 🙏 |
I had the same issue and solved it temporarily by adding this to my nuxt.config: sourcemap: {
server: false,
client: false,
}, @danielroe This is not really a 'minimal' reproduction but maybe it will help: Stackblitz Running 'yarn build' will produce similar errors as to what @Bodokh described. |
I'm getting the same error with RC 11 |
So I did some more debugging with the reproduction I shared. In my particular case there is only one component causing this issue - CardGroup.vue .
Doing either 2 or 3 independently will make the error go away. To clarify the above:
I put a breakpoint at class Link {
...
traceMappings() {
...
** else if (content != null && sourcesContent[sourceIndex] !== content) {
return error({
message: `Multiple conflicting contents for sourcemap source ${filename}`
});
}
...
} I noticed there is a difference in What doesn't make sense is that I use these same windi class combinators in other components and they are fine. Also, why does removing the script and keeping the windi class build successfully? This is about as far as I got and it's a weird one, but hopefully this provides some help in resolving the issue. |
It's definitely a weird one. Is anyone else with this issue using windicss or something similar? |
@danielroe I'm not using any. Here's dependencies list. I have no clue what's with that problem. Workaround with disabling source maps resolved the issue for me temporaly. |
I do have the same issue with rc.11 and it seems like |
I have this problem too.
|
@zavvla Do you use |
yes, it fixed problem |
Would you check whether setting |
I've added |
I did some more investigation tonight.
I found that this commit introduced the error: nuxt/framework@eab4706 The commit preceding that one does not error on build: nuxt/framework@ec21019 You can test by using the following nuxt versions:
This change to Vite maybe related? |
Thanks for the debugging @ShaggyTech. The reason that commit triggers it is that previously, vite.build.sourcemap was set to false by default, and that is probably the best workaround for now i you are experiencing this. (You can also set As for the cause, it seems like it might possibly be an upstream vite issue that is triggered by the interactions between vite plugins. It is triggered in the reproduction here, if I can tell correctly, by a sourcemap generated by components loader plugin not including the changes to classes, as you note above. |
The same symptom occurs in rc.12 version and the build and generate fails. T.T .. |
also have it .rc13 if use client-only , and component have .client prefix will be brake , need use only .client prefix will be ok. |
If you think that is a new problem, then please create a new issue |
Same issue on .rc13 Build works when
|
Same issue on .rc13 and rc. 11 |
Same issue on "nuxt": "3.0.0", |
Same issue caused when using multiple
|
Meet the same issue here. I use So I wrote these styles in pure css, the error is gone. It seems like there is something wrong with |
Is this still reproducible for anyone here with Nuxt v3.3.2? There have been some improvements upstream in Vite. |
@danielroe in Nuxt v3.3.2 this problem is gone on my end, thanks 🙏 |
On my end it fails with nuxt v3.3.3 if I use |
@MichaelNussbaumerGOWEST Could you provide a reproduction? 🙏 |
@danielroe when i run pnpm run build/generate Nuxt 3.4.3 also not work |
I revisted my reproduction I posted in an earlier comment. Repo for my project is at https://github.com/ShaggyTech/dubsquared. I'm now on Nuxt v3.4.3 with Nitro v2.3.3. I still receive the sourcemap error when trying to build the app via I can make the error go away now by turning off server sourcemap in the nuxt config like so: sourcemap: {
server: false,
}, Previously I was also disabling client sourcemaps but the problem now seems isolated to only the server build, it does not error until the server build happens, client build is successful in any case. The following is the error and trace I'm getting:
Output from
|
@ShaggyTech Checking this again, the issue seems to stem from windicss, which is generating invalid sourcemaps: When this is addressed the issue goes away. Would you open an issue in their repo? 🙏 @Soya-xy I couldn't reproduce the issue with your repo. Possibly you might have resolved it upstream. I'm closing this issue as it doesn't seem to be an issue in Nuxt. |
Environment
Darwin
v14.19.3
3.0.0-rc.10
0.5.3
yarn@1.22.19
vite
alias
,app
,env
,server
,build
,css
,modules
,ignore
,publicRuntimeConfig
,runtimeConfig
,vite
,storybook
@pinia/nuxt@0.4.2
,@vueuse/nuxt@9.2.0
,@nuxtjs/tailwindcss@5.3.3
,./modules/fonts/index.ts
-
Reproduction
I am unable to reproduce this, I only hope you might know how this sort of error can arrise. The error happens in multiple versions of node, i checked versions: 14, 16, 18
EDIT:
I can confirm the issue does not happen on rc.9.
Describe the bug
I have a project that works when using yarn dev, but when i try to build i get the following error:
Multiple conflicting contents for sourcemap source /somepath/pages/vue-page.vue
I tried deleting the page and building but it just threw the same error for another page and so on for all pages.
The build was working when I was using rc.6 beforehand.
Additional context
No response
Logs
Another Log
The text was updated successfully, but these errors were encountered: