Error when trying to run the create-react-app example
See original GitHub issueSubject of the issue
I get an error when trying to run the create-react-app example.
Your environment
Windows 10 Node v10.14.0 NPM 6.4.1
Steps to reproduce
Easy. I do: git clone cd mdx/examples/create-react-app npm i npm start
Expected behaviour
The app should run without errors.
Actual behaviour
I get this error when running the app;
Failed to compile
./src/App.js
Module not found: You attempted to import C:\Repos\mdx\examples\create-react-app\node_modules\.cache\mdx.macro\Content.796904d8db.mdx.js which falls outside of the project src/ directory. Relative imports outside of src/ are not supported.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:6
- Comments:19 (6 by maintainers)
Top Results From Across the Web
Create React App not working - Stack Overflow
1. update the npm version (npm install npm@latest -g) · 2. clear the cache (npm cache clean --force) · 3. create the react...
Read more >npx create-react-app is not working · Issue #10132 - GitHub
First, you'll need to uninstall "create-react-app" using the "npm uninstall -g create-react-app" command. Run "npx create-react-app my-app" each ...
Read more >create-react-app: command not found (React) error [Solved]
Use `npx` to solve the error create-react-app: command not found, e.g. `npx create-react-app my-app` or install the package globally by running `npm install ......
Read more >What To Do if create-react-app Doesn't Work
Another rather simple remedy for the create-react-app blues. You can try simply reinstalling the latest version of npm. To check what version of ......
Read more >npx create-react-app not working? Here's the solution.
x.x of create-react-app/react-scripts, then you may notice an error when you run the command below, as it tries to use the latest version...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I don’t understand why this issue is still open since Dec 22, 2018.
The top line is fine, the bottom line is just plain wrong? This should be a easy fix for a maintainer right? Meanwhile it’s stopping everyone trying this out on Windows, following the documented advice to use mdx.macro for create-react-app projects. The above fixes seem either very radical (ejecting) and outdated (using .env file). I’m sorry for sounding harsh, maybe I’m missing something? Please help me understand
Edit: just to add to the pool of solution. Using WSL can solve this problem. It’s a bit slower, and even more so if you keep the folder where it is, so I suggest moving the folder to the WSL home directory.
Using “// eslint-disable-next-line import/no-webpack-loader-syntax” immediately before the import now results in “Cannot find module ‘!babel-loader!mdx-loader!./About.mdx’ or its corresponding type declarations.ts(2307)”