Nextra Theme Template fails running locally
Unanswered
Giant panda posted this in #help-forum
Giant pandaOP
Error validating nextraConfig
1 Reply
Giant pandaOP
before the issue was with the next.config.mjs
before:
const withNextra = require('nextra')({
theme: 'nextra-theme-docs',
themeConfig: './theme.config.tsx',
})
module.exports = withNextra()
after:
import nextra from "nextra";
const withNextra = nextra({
theme: "nextra-theme-docs",
themeConfig: "./theme.config.tsx",
staticImage: true,
latex: true,
flexsearch: {
codeblock: false,
},
});
export default withNextra();
before:
const withNextra = require('nextra')({
theme: 'nextra-theme-docs',
themeConfig: './theme.config.tsx',
})
module.exports = withNextra()
after:
import nextra from "nextra";
const withNextra = nextra({
theme: "nextra-theme-docs",
themeConfig: "./theme.config.tsx",
staticImage: true,
latex: true,
flexsearch: {
codeblock: false,
},
});
export default withNextra();