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

Using Module Locally Fails to Find PostCSS #195

Closed
Dtphelan1 opened this issue Dec 7, 2017 · 5 comments
Closed

Using Module Locally Fails to Find PostCSS #195

Dtphelan1 opened this issue Dec 7, 2017 · 5 comments

Comments

@Dtphelan1
Copy link

Dtphelan1 commented Dec 7, 2017

Has anybody had issues where usage of the package locally fails? I'm using this package in a react-scripts project and I'm getting the following failure when trying to use the module locally:

Error in ../react-calendar-timeline/lib/lib/Timeline.js
Module not found: 'postcss' in project\react-calendar-timeline\lib\lib

 @ ../react-calendar-timeline/lib/lib/Timeline.js 24:0-25

That line is require('./Timeline.css'); and I can't find any reference to postCss in the project except in the autoPrefixer module, and I don't know why that would be called when requiring a css file.

@mcMickJuice
Copy link
Contributor

Does the solution provided here fix your issue?

#134 (comment)

TL;DR; use import Timeline from 'react-calendar-timeline/lib'

@mcMickJuice
Copy link
Contributor

Are you using webpack for this project? Can you also include webpack css-loader in your pipeline

https://github.com/webpack-contrib/css-loader

Admittedly, the way this library handles its styling is problematic and will/should be changed

@Dtphelan1
Copy link
Author

Dtphelan1 commented Jan 22, 2018

I was building with create-react-app, so yes to webpack; that said, my team is vehemently against ejecting the project and exposing full control over the pipeline. The first solution listed in the referenced issue worked for us though! Thanks for responding 👍

@mcMickJuice
Copy link
Contributor

Sorry for the trouble. I hope to make the handling of the timelines default CSS file easier to work with going forward.

@Dtphelan1
Copy link
Author

Dtphelan1 commented Jan 22, 2018

No worries! Thanks for making such a great library public in the first place! 😄

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