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

Not easy to debug error only in dev mode #1395

Closed
3 tasks done
emersonbottero opened this issue Sep 24, 2022 · 8 comments · Fixed by #1410 or #1428
Closed
3 tasks done

Not easy to debug error only in dev mode #1395

emersonbottero opened this issue Sep 24, 2022 · 8 comments · Fixed by #1410 or #1428
Labels
bug Something isn't working build Related to the build system

Comments

@emersonbottero
Copy link

emersonbottero commented Sep 24, 2022

Describe the bug

The build and serve commands works but the dev doesn't.

Reproduction

clone the repo

  • yarn build (you will get some post build error because I'm transitioning the documentation to vitepress)
  • yarn vdocs:build
  • yarn vdocs:serve (it works normally)
  • yarn vdocs:dev (it will thrown an error)

The error thrown is misleading in my opinion..

Uncaught TypeError: Cannot read properties of undefined (reading 'accept')
at VPSkipLink.vue:37:3

Expected behavior

the error should point to the correct file?
I'm sure is not a problem in VPSkipLink file.
Is hard to debug without knowledge of vitepress internal logic

System Info

System:
    OS: Windows 10 10.0.22621
    CPU: (8) x64 Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
    Memory: 8.47 GB / 15.92 GB
  Binaries:
    Node: 16.13.2 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.5 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 8.1.3 - ~\AppData\Roaming\npm\npm.CMD
  Browsers:
    Chrome: 105.0.5195.127
    Edge: Spartan (44.22621.601.0), Chromium (105.0.1343.50)
    Internet Explorer: 11.0.22621.1
  npmPackages:
    vitepress: ^1.0.0-alpha.15 => 1.0.0-alpha.15

Additional context

I'm convincing the mermaidjs team to update their documentation to use vitepress 😁.
I created a repo from scratch first and it works without problem but in the mermaid repo this error may be a combination of the setting done in packaeg.json and tsconfig but!

I think we really want anyone to be able to use vitepress to update any library out there (mission inspiration?? 😅)

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.
@emersonbottero emersonbottero added the bug: pending triage Maybe a bug, waiting for confirmation label Sep 24, 2022
@brc-dd
Copy link
Member

brc-dd commented Sep 24, 2022

Finally got a reproduction 😅. (This is same as #1374 BTW. )

@brc-dd
Copy link
Member

brc-dd commented Sep 24, 2022

Fixed in vitejs/vite#10207

@yaman3bd
Copy link

@brc-dd I am still having the same error,
my file structure:
Screen Shot 2022-09-24 at 10 54 23 PM

config.ts is empty,
index.md has just a demo message: # Hello world
I think by default it should show whatever inside index.md file
but after starting the server an empty page shows with the same error:
Screen Shot 2022-09-24 at 10 57 12 PM
my packages versions:

    "vite": "^3.1.2",
    "vitepress": "^1.0.0-alpha.16",
    "vue": "^3.2.39"

is there something missing, or wrong I am doing?

@emersonbottero
Copy link
Author

emersonbottero commented Sep 24, 2022

@yaman3bd it has not been published yet..
wait for the next vite release!

@brc-dd brc-dd added bug Something isn't working dependencies build Related to the build system and removed bug: pending triage Maybe a bug, waiting for confirmation labels Sep 26, 2022
@emersonbottero
Copy link
Author

@brc-dd I'm still getting the same error.
You can update vitepress and vite in the mentioned repo to see the problem.

@brc-dd
Copy link
Member

brc-dd commented Sep 30, 2022

I haven't released a new version yet.

@brc-dd
Copy link
Member

brc-dd commented Oct 1, 2022

Weird, not working on alpha-18 too :/

@brc-dd brc-dd reopened this Oct 1, 2022
@brc-dd
Copy link
Member

brc-dd commented Oct 1, 2022

Ah, this will be fixed in next version of @vitejs/plugin-vue

@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.

3 participants