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.

JSX -> JS dist-modules issue

See original GitHub issue

Hi! I really like this project. I’m attempting to use it in an educational workshop tomorrow but I’m stuck.

I’m running I keep running into an issue where my dist-modules are attempting to require .jsx files, but the compiled files in dist-modules has .js extensions resulting in an error.

This is strange to me because the docs compile and run fine, and everything else is great. But when I install the package into another project such as create-react-app it results in the aforementioned errors with JS/JSX

Here are some screenshots

screen shot 2017-05-08 at 11 03 51 am

screen shot 2017-05-08 at 11 00 11 am

And here is a link to my test repo https://github.com/richattack/testjam

This is my first attempt at making an external component library. I’ve been debugging this issue for weeks not sure what the problem but I believe it to be a webpack or babel related issue.

Thanks!

Rich

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
bebrawcommented, May 8, 2017

Ok, cool. Especially the webpack book might have relevant content.

Feel free to reach out at gitter.

0reactions
richieiocommented, May 8, 2017

Thanks! That works perfectly. Just tested it. I will check out your presentations too. The topic is around developer workflow, component libraries and rapid prototyping. Thank you so much again. I will follow up later to tell you how the workshop goes.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot resolve module · Issue #289 · necolas/react-native-web
js Module not found: Error: Cannot resolve module 'react/lib/findDOMNode' in /home/user/prj/aws/node_modules/react-native-web/dist/modules/ ...
Read more >
Cannot find module 'react-dnd' from 'reactTags.js' - Stack ...
I'm having the same issue as well. Some things I've attempted: jest.unmock(module) at the top of the testing file polyfill the module in...
Read more >
Code-Splitting - React
Your bundles will end up looking a lot different than this. If you're using Create React App, Next.js, Gatsby, or a similar tool,...
Read more >
referenceerror: fetch is not defined react native detox - You.com
The problem was that fetch isn't available in a node environment like mocha. I'm not sure why react-native-mock (which I'm also using) doesn't...
Read more >
Building an Open Source React Component - David Clark
Use Babel to transpile JSX (and ES6) from src/ to a dist-modules/ directory, and have index.js reference files in that pre-compiled directory.
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