Skip to content
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 './Timeline.jsx' #2

Open
qwwwpp opened this issue Mar 5, 2019 · 3 comments
Open

Can't resolve './Timeline.jsx' #2

qwwwpp opened this issue Mar 5, 2019 · 3 comments

Comments

@qwwwpp
Copy link

qwwwpp commented Mar 5, 2019

I got the error after I plug in the 'react-timespan'
Here is the error :

./node_modules/react-timespan/dist/index.js
Module not found: Can't resolve './Timeline.jsx' in '/Users/apple/Documents/Wish_Life/test/node_modules/react-timespan/dist'

the index.js require Timeline.jsx, but there is not such a file

@coleturner
Copy link
Owner

coleturner commented Mar 5, 2019

Ahhh, thanks for filing this report. It looks like the build process is transpiling .jsx into .js

I won't be able to get to this until later today (~12 hours), if you prefer to take a crack at it I'm happy to add you as a contributor :)

The easy fix I think for this issue is to not hardcode the .jsx extension but at the moment there is no development runtime for this repository. It was published as a keepsake.

You could also copy/paste the files from here into your codebase and remove the .jsx which might work better for your use case

@qwwwpp
Copy link
Author

qwwwpp commented Mar 5, 2019

I copied the files and it works. But it doesn't work as what the demo looks like.

image

The timeline doesn't fit into a wide screen(there is a blank on the right side and the content is not centered), and the timeline is offset with the labels.

@coleturner
Copy link
Owner

The styles might be more nuanced than what is included here. That's my bad for not putting in a development runtime. You can find all the styles that may have been used for this component here:

https://github.com/coleturner/portfolio/tree/2091cfdb3a9904db08834ab0dd913f429bb44209/assets/stylesheets

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants