nuxt-themes/docus

200.html broken: 404 page flashes and then js errors prevent any further action

mschoeffmann opened this issue · 0 comments

using /200.html as fallback-page, makes the 404 page flash upon loading, and then console errors appear.
after this console errors, it's not even possible to use the search or any other js feature.

directly navigating to index.html works - but this is does not falk as fallback url beacuse it displays the index page.

this worked with @nuxt-themes/docus@1.13 and nuxt@3.5

reproduction:

https://stackblitz.com/edit/docus-fallback-test-ehp6nm?file=README.md

  • clone this repository to your local drive
  • pnpm install
  • pnpm run generate
  • docker run -v ./dist:/usr/share/nginx/html:ro -v ./nginx.conf:/etc/nginx/conf.d/default.conf:ro -p 3000:80 nginx:latest
  • navigate to http:/localhost:3000 with chrome devtools > network tab open

... you'll see the 404 page flashing and then errors in the console will appear.

console errors:

entry.e94818d9.js:1 TypeError: Cannot read properties of null (reading 'parentNode')
    at parentNode (entry.e94818d9.js:1:64852)
    at xi.V [as fn] (entry.e94818d9.js:1:50480)
    at xi.run (entry.e94818d9.js:1:4209)
    at b.update (entry.e94818d9.js:1:51196)
    at G (entry.e94818d9.js:1:50173)
    at I (entry.e94818d9.js:1:49835)
    at h (entry.e94818d9.js:1:46672)
    at R (entry.e94818d9.js:1:49081)
    at E (entry.e94818d9.js:1:49624)
    at h (entry.e94818d9.js:1:46608)
Ih @ entry.e94818d9.js:1
entry.e94818d9.js:1 Uncaught (in promise) TypeError: Cannot destructure property 'bum' of 'b' as it is null.
    at Lt (entry.e94818d9.js:1:54498)
    at we (entry.e94818d9.js:1:53840)
    at Lt (entry.e94818d9.js:1:54569)
    at we (entry.e94818d9.js:1:53840)
    at Ae (entry.e94818d9.js:1:54806)
    at we (entry.e94818d9.js:1:53996)
    at Ae (entry.e94818d9.js:1:54806)
    at we (entry.e94818d9.js:1:53996)
    at Ae (entry.e94818d9.js:1:54806)
    at we (entry.e94818d9.js:1:53996)