"Error: Cannot find module" with .jsx files
See original GitHub issueTrying to replace nodemon + babel-node with babel-watch, running with babel-watch
gives an error when babel-node
does not. I don’t think the --extension
option affects this but I threw it on just in case.
babel-core
v6.14.0
should work, but does not:
$ node_modules/.bin/babel-watch src/index.js -e .js,.jsx
Error: Cannot find module './views/appFactory'
babel-node
works:
$ node_modules/.bin/babel-node src/index.js
[18:18:23] Running server at 0.0.0.0:8000
Renaming appFactory.jsx
to appFactory.js
makes the error go away, but then I’d have to find all of them and this isn’t my code.
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
webpack can't find module if file named jsx - Stack Overflow
Webpack doesn't know to resolve .jsx files implicitly. You can specify a file extension in your app ( import App from '.
Read more >Fix - Cannot find module 'react' error - Reactgo
In this tutorial, we are going to learn about how to fix the cannot find module 'react' error. This error occurs due to...
Read more >cannot find module [Node npm Error Solved] - freeCodeCamp
To fix the error, you need to install the package that is absent in your project directory – npm install package-name or yarn...
Read more >cannot find module react | The AI Search Engine You Control
To solve the "Cannot find module react or its corresponding type declarations" error, install the module and its type definitions by running the...
Read more >Fix typescript error for mdx files in React
Fix: Cannot find module 'MyComponent.mdx' or its corresponding type declarations in React.
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
@crccheck cool. Thanks for your help. I think I have a fix for the issue. Will send it out very soon and let you know once it’s here
@crccheck thanks so much for reporting!