-
-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Potentially unnecessary peer dependency? #237
Comments
I am having the same problem. My {
"name": "cules-blog-yt",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@chakra-ui/icons": "^1.1.7",
"@chakra-ui/react": "^1.8.6",
"@emotion/react": "^11",
"@emotion/styled": "^11",
"framer-motion": "^6",
"gray-matter": "^4.0.3",
"mongoose": "^6.2.6",
"nanoid": "^3.3.1",
"next": "12.1.0",
"next-mdx-remote": "^4.0.0",
"react": "17.0.2",
"react-dom": "17.0.2",
"reading-time": "^1.5.0"
},
"devDependencies": {
"eslint": "8.11.0",
"eslint-config-next": "12.1.0"
}
} If I install the dependencies with
|
Fixed the problem temporarily. I downgraded mdx and react yarn add @mdx-js/mdx@^1.6.16 @mdx-js/react@^1.6.16 react@^16.9.0 react-dom@^16.9.0 |
The correct fix - until the maintainer of this package updates
This forces |
some notable changes - had to use `pre` for code blocks: hashicorp/next-mdx-remote#244 - had to force react version for mdxjs: PaulieScanlon/mdx-embed#237 - had to update mousetrail package to match react
Installing
mdx-embed@^0.0.22
withnpm@8.1.2
throws anERESOLVE unable to resolve dependency tree
error whenreact@^17.0.2
is installed as a dependency ofnext@12.0.7
.I noticed
mdx-embed
listsreact@^16.9.0
as apeerDependency
. But@mdx-js/react@^1.6.16
listsreact@"^16.13.1 || ^17.0.0"
. I rannpm install --legacy-peer-deps mdx-embed
, which I think may suppress the error in spite of the listed peer dependency. In any case, the installation worked. I ran a quick test and the embedding seems to work.Does React 17 break
mdx-embed
in some way, or couldreact@^16.9.0
be removed frompeerDependencies
to avoid npm installation errors?Reproduce with:
Here’s the output you get after running
npm install
:The text was updated successfully, but these errors were encountered: