question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Error: Cannot find module" with .jsx files

See original GitHub issue

Trying 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:closed
  • Created 7 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
kmagieracommented, Sep 19, 2016

@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

0reactions
kmagieracommented, Sep 20, 2016

@crccheck thanks so much for reporting!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found