Closed sgmheyhey closed 3 years ago
Is the problem here that you needed to install React? React is a peer dependancy. Could you elaborate a bit and I’d be happy to investigate
EDIT:
"dependencies": {
"@emotion/react": "latest",
"@emotion/styled": "latest",
"@mdx-js/loader": "latest",
"@mdx-js/mdx": "latest",
"@mdx-js/react": "latest",
"@next/mdx": "latest",
"lodash": "latest",
"mdx-embed": "latest",
"next": "latest",
"prism-react-renderer": "latest",
"react": "latest",
"react-dom": "latest",
"react-live": "latest",
"remark-emoji": "latest",
"remark-images": "latest",
"styled-components": "latest",
"unified-ui": "latest"
},
"devDependencies": {
"@emotion/babel-plugin": "latest",
"babel-eslint": "latest",
"eslint": "latest",
"eslint-config-babel": "latest",
"eslint-config-google": "latest",
"eslint-config-prettier": "latest",
"eslint-plugin-import": "latest",
"eslint-plugin-prettier": "latest",
"eslint-plugin-react": "latest",
"eslint-plugin-standard": "latest",
"prettier": "latest"
},
The whole of my package.json
file was like the above.
I missed some in the previous comment by my mistake.
I guess that it is not matching some peers in the newest packages.
Hi @sgmheyhey i still don't really understand the problem. If you've installed the peer dependancies you should be fine. Is your Next project setup to use MDX, i don't see @next/mdx
in your deps.
I'll close this issue but feel free to open one again if you're still having problems.
Sorry, I've just edited the above comment.
@sgmheyhey could you maybe try installing the peer deps as version numbers: Here's what MDX Embed wants as peerDependencies
"peerDependencies": {
"@mdx-js/mdx": "^1.6.16",
"@mdx-js/react": "^1.6.16",
"react": "^16.13.1",
"react-dom": "^16.13.1"
}
They're gone! Thank you!
Ok great!
I think the problem was MDX Embed has a peer dependancy of "react: ^16.x.x"
and you had installed "react: latest"
which would have installed "react 17.x.x"
The difference between "16.x.x."
and "17.x.x"
with regard to semver
is "breaking" so i think there's probably something in "react 17.x.x."
that doesn't work with MDX Embed...
...but that's ok. MDX Embed does specify that it's "react: 16.x.x"
you need to install not "react: latest"
or "react: 17.x.x."
@PaulieScanlon is there any plan to support react 17 in the future?
Describe the bug
with react@17.x.x, the messages are produced. it seems working but the messages should be cleared.