Not easy to debug error only in dev mode
See original GitHub issueDescribe 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.
Issue Analytics
- State:
- Created a year ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
release mode error, but not in debug mode - Stack Overflow
RedX: I like developing in Debug because the safeguards are helpful sometimes. But you can develop in release, too. Just turn off optimizations, ......
Read more >How to Debug JavaScript Errors - Rollbar
Debugging JavaScript errors in a production environment can be a difficult experience. More often than not, the error reports are vague, ...
Read more >Debugging methods and error types - HubSpot Developers
Understanding how to debug and look into errors when developing websites on the HubSpot CMS.
Read more >Error: Unable to Start Debugging on the Web Server
When you try to debug an ASP.NET application running on a Web server, you may get this error message: Unable to start debugging...
Read more >How I solved and debugged my Webpack issue through trial ...
I knew that Webpack was not easy to configure: there are many parts ... out that the webpack-dev-server has been in maintenance mode...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Fixed in https://github.com/vitejs/vite/pull/10207
Ah, this will be fixed in next version of @vitejs/plugin-vue