You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although vitepress dev docs works perfectly, when I try to build for production, I get an error which I cannot trace.
What reasons could be preventing the build? Or at least, how could I at least inspect the .temp/app.js file to understand which line fails?
❯ yarn build:docs
yarn run v1.22.17
$ vitepress build docs
vitepress v1.0.0-alpha.4
/Users/joseporto/project/teldoc/shared/ui/docs/.vitepress
✓ building client + server bundles...
✖ rendering pages...
build error:
TypeError: Cannot read properties of undefined (reading 'substring')
at /Users/joseporto/project/shared/ui/docs/.vitepress/.temp/app.js:608:46
at Array.forEach (<anonymous>)
at Function.install (/Users/joseporto/project/teldoc/shared/ui/docs/.vitepress/.temp/app.js:607:20)
at Object.use (/Users/joseporto/project/teldoc/shared/ui/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js:3393:28)
at Object.enhanceApp (/Users/joseporto/project/teldoc/shared/ui/docs/.vitepress/.temp/app.js:634:9)
at createApp (/Users/joseporto/project/teldoc/shared/ui/docs/.vitepress/.temp/app.js:822:11)
at renderPage (file:///Users/joseporto/project/teldoc/shared/ui/node_modules/vitepress/dist/node/serve-05342c3d.js:39535:27)
at async build (file:///Users/joseporto/project/teldoc/shared/ui/node_modules/vitepress/dist/node/serve-05342c3d.js:39853:9)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Reproduction
Not reproducible since it's only happening with this project.
Expected behavior
Vitepress builds or at least outputs a more meaningful error message.
thanks @brc-dd, it was indeed one of the libs added in enhanceApp. Ultimately it had to do with the fact that in production you cannot extract component.name but component.__name instead. Really hard to track this one.
For future reference, and considering vitepress: ^1.0.0-alpha.4 => 1.0.0-alpha.4
I ended up just removing the await lib$1.remove(siteConfig.tempDir) in vitepress npm module, to bypass the temp file deletion. This immediately allowed me to find the offending line.
Describe the bug
Although
vitepress dev docs
works perfectly, when I try to build for production, I get an error which I cannot trace.What reasons could be preventing the build? Or at least, how could I at least inspect the
.temp/app.js
file to understand which line fails?Reproduction
Not reproducible since it's only happening with this project.
Expected behavior
Vitepress builds or at least outputs a more meaningful error message.
System Info
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: