Closed dutterbutter closed 1 year ago
does it work after next build
? here is an error
@B2o5T is that on the repo I provided? Running next build
gives me no error. See output below:
While next build
works for me, if I run next build && next export
then it throws an error in search "Failed to load search"
Here is my next.config.js
const withNextra = require('nextra')({
theme: 'nextra-theme-docs',
//theme: './theme.tsx',
themeConfig: './theme.config.jsx',
})
module.exports = {
...withNextra({}),
images: {
unoptimized: true,
domains: ['www.locofy.ai'],
},
assetPrefix: './'
}
Resolved the issue by updating deps.
@dutterbutter By any chance do you remember what dep was causing this? I'm facing the same error, but after updating my deps, the error persists.
The browser shows a 404 trying to get nextra-data-en-US.json
, just like in the screenshot posted by B2o5T
@lucas-labs I can't speak to the 404 trying to get nextra-data-en-US.json
as I did not experience that. However if I recall correctly the deps we used were:
"next": "^13.0.0",
"next-themes": "^0.2.0",
"nextra": "^2.0.1",
"nextra-theme-docs": "^2.0.1",
We also had to fix the an mdx file that was incorrectly formatted to resolve the search index issue. Hope that helps!
Bug Report: Search functionality failing to load search index in deployed instance
Overview
We are currently using
nextra-theme-docs
for our documentation site, and the search functionality in a deployed instance is now failing to load the search index. However, the search bar works fine in a local environment.Relevant links
nextra-theme-docs
andnextra
to2.3.0
: https://github.com/webb-tools/webb-docs/tree/db/test-searchdb/test-search
branch: https://db-test-search--development-webb-docs.netlify.app/docs/Things tried
nextra-theme-docs
andnextra
to2.3.0
flexsearch
innext.config.js
Steps to reproduce
git clone https://github.com/webb-tools/webb-docs
yarn install
yarn dev
localhost:3000/docs
and use the search. This WILL work in the local environment.yarn install && yarn build
and publish dir as./.next
. This is where the search functionality breaks and indicates "failed to load search index."Any suggestions here would be appreciated, and or if need more info on this report please let me know. Thanks!