core: Error in built docs: ``Referapp.c20e2fa1.js:1 Uncaught ReferenceError: Cannot access 'j' before initialization``

Description

Hello,

followed the documentation and started a new vuepress project using 2.0.0-beta.52 Works fine and great in local dev but built docs throw errors and seems like all js fails because of it (e.g. search, selection of theme light<>dark)

STRP:

  1. go to src
  2. run npm install
  3. run npm run docs:build
  4. Upload .vuepress dist folder to some FTP or deploy to github pages
  5. observe error in console

image

config:

import { defineUserConfig, defaultTheme } from 'vuepress'

export default defineUserConfig({
    base: "/wiki-test/",
    lang: 'en-US',
    title: 'Title',
    description: '....',
})

Reproduction

https://github.com/marwie/wiki-test/tree/vuepress/build-error

dist.zip

Used Package Manager

npm

System Info

win 10
Chrome Version 106.0.5249.119

Screenshots

app: image

vendor: image

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 18 (8 by maintainers)

Most upvoted comments

The problematic commits have been reverted in v2.0.0-beta.53. Let me know if there are still some issues.

Hello @Mister-Hope sorry about that - i wasnt using them in the config.ts

Remove them from package.json, cleared caches, built and got the same result.

The branch is updated