#Nextra V4 Setup

13 messages · Page 1 of 1 (latest)

inner ledge
#

So i am trying to go from nextra v3 to v4 but it keeps giving error ```- error [nextra] Error while loading { pathSegments: [] } Error: Cannot find module './undefined'
at webpackContextResolve (.next/server/app/docs/[[...mdxPath]]/page.js:58:11)
at webpackContext (.next/server/app/docs/[[...mdxPath]]/page.js:53:11)
at async Page (src/app/docs/[[...mdxPath]]/page.jsx:12:17)
10 | export default async function Page(props) {
11 | const params = await props.params

12 | const result = await importPage(params.mdxPath)
| ^
13 | const { default: MDXContent, toc, metadata } = result
14 | return (
15 | <Wrapper toc={toc} metadata={metadata}> {
code: 'MODULE_NOT_FOUND'
}
GET /docs 404 in 20974ms```

tribal vergeBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

inner ledge
#

or is there any other good docs generator?

#

that i can use with my already existing site

#

my app.jsx ```jsx
/* eslint-disable react-hooks/rules-of-hooks -- false positive, useMDXComponents isn't react hooks */

import { generateStaticParamsFor, importPage } from 'nextra/pages'
import { useMDXComponents } from '../../../../mdx-components'

export const generateStaticParams = generateStaticParamsFor('mdxPath')

const Wrapper = useMDXComponents().wrapper

export default async function Page(props) {
const params = await props.params
const result = await importPage(params.mdxPath)
const { default: MDXContent, toc, metadata } = result
return (
<Wrapper toc={toc} metadata={metadata}>
<MDXContent {...props} params={params} />
</Wrapper>
)
}```

inner ledge
inner ledge
#

had to delete my website

#

and use the template

#

in examples

#

but i got it done

#

👍

#

tho

#

wait