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

crash on the first load of examples/minimal #1016

Closed
3 tasks done
fi3ework opened this issue Jul 19, 2022 · 3 comments · Fixed by #856
Closed
3 tasks done

crash on the first load of examples/minimal #1016

fi3ework opened this issue Jul 19, 2022 · 3 comments · Fixed by #856
Labels
bug Something isn't working build Related to the build system

Comments

@fi3ework
Copy link
Contributor

Describe the bug

When starts to dev the examples/minimal in this repository. The first load will trigger a runtime error which is the same as vuejs/core#4344. Everything goes well unless using a linked vitepress so the users won't encounter this error. But it breaks #1012 because of the first load crash. And after a page reload, everything goes well and won't crash anymore, the crash only happens when creating .vite cache. I think it's because packages are optimized by Vite which does not in an un-linked scenario.

image

link

image

un-link

image

I have a workaround to make #1012 pass but I don't really know why packages such as body-scroll-lock are optimized by Vite 🤔. Also, since we are migrating to Vite3, does this issue still exists in Vite3 based vitepress yet? @brc-dd

Reproduction

  1. clone main branch
  2. pnpm i && pnpm build
  3. cd examples/minimal
  4. pnpm dev --force

Expected behavior

no crash at the first page load

System Info

System:
    OS: macOS 12.4
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 267.59 MB / 32.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.15.0 - ~/Library/Caches/fnm_multishells/22311_1658125341110/bin/node
    npm: 8.5.5 - ~/Library/Caches/fnm_multishells/22311_1658125341110/bin/npm

Additional context

No response

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
@fi3ework fi3ework added the bug: pending triage Maybe a bug, waiting for confirmation label Jul 19, 2022
@brc-dd
Copy link
Member

brc-dd commented Jul 19, 2022

does this issue still exists in Vite3 based vitepress

No, not happening for me on chore/vite-3 branch.

@fi3ework
Copy link
Contributor Author

does this issue still exists in Vite3 based vitepress

No, not happening for me on chore/vite-3 branch.

Good to hear that. When would the chore/vite-3 branches be merged into main? I will use a workaround to make #1012 pass if chore/vite-3 still needs some time to be merged.

@brc-dd
Copy link
Member

brc-dd commented Jul 19, 2022

When would the chore/vite-3 branches be merged into main?

It will likely take some time because there are a lot of changes, its hard to review and test them. You can add that workaround if you want. It can be removed later if Vite 3 PR is merged before your one.

@brc-dd brc-dd added bug Something isn't working build Related to the build system and removed bug: pending triage Maybe a bug, waiting for confirmation labels Jul 19, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working build Related to the build system
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants