0

I have a project that is working properly (as far as I can see), now I want to add a blog using MDX and have gone through the installation process but when I start the localhost I get an error message that says " Module not found".

Everything works perfectly when I remove the config for the MDX in next.config.js, o i am not sure what is going on here. Can anybody help? Thanks

Error: Cannot find module './undefined.json'
    at C:\Users\XXXX\OneDrive\Desktop\Development\PROJECT_NAME\.next\server\pages\404.js:34:12
    at async getStaticProps (webpack-internal:///./pages/404.js:96:22)
    at async Object.renderToHTML (C:\Users\XXXX\OneDrive\Desktop\Development\PROJECT_NAME\node_modules\next\dist\server\render.js:465:20)
    at async doRender (C:\Users\XXXX\OneDrive\Desktop\Development\PROJECT_NAME\node_modules\next\dist\server\base-server.js:879:38)
    at async cacheEntry.responseCache.get.isManualRevalidate.isManualRevalidate (C:\Users\XXXX\OneDrive\Desktop\Development\PROJECT_NAME\node_modules\next\dist\server\base-server.js:979:28)
    at async C:\Users\XXXX\OneDrive\Desktop\Development\PROJECT_NAME\node_modules\next\dist\server\response-cache.js:64:36 {
  code: 'MODULE_NOT_FOUND'
}
PS C:\Users\XXXX\OneDrive\Desktop\Development\PROJECT_NAME>

Alex Cotton
  • 3
  • 1
  • 2

0 Answers0