Closed deeseert closed 1 year ago
It seems to be an error coming from next-mdx which I resolved, for now, with overrides in package.json:
"overrides": {
"@mdx-js/mdx": "2.1.5",
"@mdx-js/react": "2.1.5"
}
Solution found on their Github repo.
Hello @deeseert
can you give me your repository link? or can you upload your full package.json file here? thanks
Hi @tfsomrat,
I don't have a repo but here is the package.json:
{
"name": "bookworm-light-nextjs",
"author": "Themefisher",
"version": "1.1.0",
"private": false,
"license": "MIT",
"scripts": {
"dev": "next dev",
"build": "node lib/jsonGenerator.js && next build",
"export": "next build && next export",
"lint": "next lint",
"start": "next start"
},
"dependencies": {
"github-slugger": "^1.4.0",
"gray-matter": "^4.0.3",
"marked": "^4.1.1",
"next": "12.3.1",
"next-mdx-remote": "^4.1.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-gtm-module": "^2.0.11",
"react-icons": "^4.6.0",
"rehype-slug": "^5.0.1",
"remark-gfm": "^3.0.1"
},
"devDependencies": {
"date-fns": "^2.29.3",
"date-fns-tz": "^1.3.7",
"@tailwindcss/forms": "^0.5.3",
"@tailwindcss/typography": "^0.5.7",
"autoprefixer": "^10.4.12",
"eslint": "8.25.0",
"eslint-config-next": "12.3.1",
"jshint": "^2.13.5",
"postcss": "^8.4.18",
"prettier": "^2.7.1",
"prettier-plugin-tailwindcss": "^0.1.13",
"sass": "^1.55.0",
"sharp": "^0.31.1",
"tailwind-bootstrap-grid": "^5.0.1",
"tailwindcss": "^3.1.8"
},
"overrides": {
"@mdx-js/mdx": "2.1.5",
"@mdx-js/react": "2.1.5"
}
}
Adding overrides worked. So I believe that's an error of incompatibility between mdx and nextjs?
Hey @deeseert
we take a step back by changing the next-mdx-remote
version to 3.0.8
so everything run perfectly. also we updated the template to Nextjs 13. you can download the latest code and check if is everything working perfectly. thanks
Hi there,
I'm trying to run the template locally but I get the error TypeError:
_jsxDEV is not a function
.I've tried node 18, 16, 14. Is there a way to resolve this?
Thanks!