-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't resolve component error in CRA #44
Comments
I just set up a new instance of CRA with App set up like this:
and my mdx file:
Button just returns a simple button. Same error:
|
Hey, right now mdx.macro doesn't support If you want to use MDX with CRA, currently the best way is to use a loader string (e.g. This may change with a future version of CRA, but unfortunately CRA@2 really just isn't made to work with MDX. :-( |
This seems to be the recommended path for create-react-app now, for this issue: I think this documentation is misleading: I think those docs should probably get updated to direct folks to the article above (or have that stuff brought in to the official docs) because the docs currently imply that the Would you agree with that assessment @jamesknelson ? |
Thanks @dreadwail for your response! Today I was struggling with the same error! The docs of mdxjs.com are still showing the old path to use But I don't have confidence to replace |
A better solution would be using react-app-rewired or craco. Let's see if I can get it up and running. |
I am having trouble getting MDX (0.2.8) to work with CRA (react-scripts 2.1.8) and React (16.8.6). I am using Node 10.1.0. (Just updated to 11.13.0, problem persists)
I keep getting the error:
Can't resolve './MyComponent' in '...node_modules/.cache/mdx.macro/MyComponent.84dc28b7ef.mdx.js'
despite it being in the same dir?
Not sure if it is related but I also get a loop of errors in iTerm immediately after it fails:
node[50284] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-21)
until it eventually errors too many times and halts the output to the terminal.The text was updated successfully, but these errors were encountered: