Skip to content
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

[Bug Report] 5.2.12 regression - dynamic css import will cause MODULE_NOT_FOUND in SSR build #17366

Closed
7 tasks done
meteorlxy opened this issue May 31, 2024 · 2 comments · Fixed by #17371
Closed
7 tasks done
Labels
feat: css feat: ssr p3-minor-bug An edge case that only affects very specific usage (priority) regression The issue only appears after a new release

Comments

@meteorlxy
Copy link
Contributor

meteorlxy commented May 31, 2024

Describe the bug

Dynamic import css file:
image

SSR build in 5.2.11:
image

SSR build in 5.2.12:
image

The file is removed, but it's still referenced in the SSR build, which will cause ERR_MODULE_NOT_FOUND when executing it

image

Reproduction

https://github.com/meteorlxy/vite-5-2-12-repro

Steps to reproduce

Check the reproduce repo

System Info

System:
    OS: macOS 14.4
    CPU: (10) arm64 Apple M1 Pro
    Memory: 62.78 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.12.2 - ~/Library/Caches/fnm_multishells/10557_1717167804709/bin/node
    npm: 10.5.0 - ~/Library/Caches/fnm_multishells/10557_1717167804709/bin/npm
    pnpm: 9.1.4 - ~/Library/Caches/fnm_multishells/10557_1717167804709/bin/pnpm
    Watchman: 2024.05.06.00 - /opt/homebrew/bin/watchman
  Browsers:
    Chrome: 125.0.6422.113
    Safari: 17.4

Used Package Manager

pnpm

Logs

No response

Validations

@bluwy
Copy link
Member

bluwy commented May 31, 2024

Maybe related #16078

@meteorlxy
Copy link
Contributor Author

meteorlxy commented May 31, 2024

Maybe related #16078

Yes that's it. It's a regression that breaks some vuepress plugins during SSR.

cc @sapphi-red

@sapphi-red sapphi-red added feat: css p3-minor-bug An edge case that only affects very specific usage (priority) feat: ssr regression The issue only appears after a new release labels Jun 1, 2024
nekomeowww added a commit to nolebase/integrations that referenced this issue Jun 3, 2024
…l0sNRNKZ.js

Cannot find module '/Users/neko/Git/nolebase/integrations/docs/.vitepress/.temp/style.l0sNRNKZ.js' imported from /Users/neko/Git/nolebase/integrations/docs/.vitepress/.temp/app.js
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/neko/Git/nolebase/integrations/docs/.vitepress/.temp/style.l0sNRNKZ.js' imported from /Users/neko/Git/nolebase/integrations/docs/.vitepress/.temp/app.js

Already fixing:

[Bug Report] 5.2.12 regression - dynamic css import will cause MODULE_NOT_FOUND in SSR build · Issue #17366 · vitejs/vite
vitejs/vite#17366

Signed-off-by: Neko Ayaka <neko@ayaka.moe>
nekomeowww added a commit to nolebase/integrations that referenced this issue Jun 3, 2024
…l0sNRNKZ.js

Cannot find module '/Users/neko/Git/nolebase/integrations/docs/.vitepress/.temp/style.l0sNRNKZ.js' imported from /Users/neko/Git/nolebase/integrations/docs/.vitepress/.temp/app.js
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/neko/Git/nolebase/integrations/docs/.vitepress/.temp/style.l0sNRNKZ.js' imported from /Users/neko/Git/nolebase/integrations/docs/.vitepress/.temp/app.js

Already fixing:

[Bug Report] 5.2.12 regression - dynamic css import will cause MODULE_NOT_FOUND in SSR build · Issue #17366 · vitejs/vite
vitejs/vite#17366

Signed-off-by: Neko Ayaka <neko@ayaka.moe>
nekomeowww added a commit to nolebase/integrations that referenced this issue Jun 5, 2024
…dalone packages (#229)

* fix: build error Error [ERR_MODULE_NOT_FOUND] .vitepress/.temp/style.l0sNRNKZ.js

Cannot find module '/Users/neko/Git/nolebase/integrations/docs/.vitepress/.temp/style.l0sNRNKZ.js' imported from /Users/neko/Git/nolebase/integrations/docs/.vitepress/.temp/app.js
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/neko/Git/nolebase/integrations/docs/.vitepress/.temp/style.l0sNRNKZ.js' imported from /Users/neko/Git/nolebase/integrations/docs/.vitepress/.temp/app.js

Already fixing under [[Bug Report] 5.2.12 regression - dynamic css import will cause MODULE_NOT_FOUND in SSR build · Issue #17366 · vitejs/vite](vitejs/vite#17366)

* chore: update to main
* chore: correct package.json

Signed-off-by: Neko Ayaka <neko@ayaka.moe>
@github-actions github-actions bot locked and limited conversation to collaborators Jun 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feat: css feat: ssr p3-minor-bug An edge case that only affects very specific usage (priority) regression The issue only appears after a new release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants