stephane-monnot / react-vertical-timeline

Vertical timeline for React.js
https://stephane-monnot.github.io/react-vertical-timeline/
MIT License
1.08k stars 158 forks source link

Error: Global CSS cannot be imported from within node_modules #49

Closed gaurav517 closed 4 years ago

gaurav517 commented 4 years ago

I see following with nextjs:

[ error ] /Users/user/Documents/myproject/client/node_modules/react-vertical-timeline-component/style.min.css
Global CSS cannot be imported from within node_modules.
Read more: https://err.sh/next.js/css-npm

I copied that file style.min.css out of node_modules, but still I see:

[ error ] ./src/styles/vertical.timeline.css
Global CSS cannot be imported from within node_modules.
Read more: https://err.sh/next.js/css-npm

Can you please suggest something? thanks.

stephane-monnot commented 4 years ago

I don't use next. Maybe it's a mistake in your next config. Maybe you need to use @zeit/next-css and modify your next.config.js to append withCSS

gaurav517 commented 4 years ago

it was resolved by adding import 'react-vertical-timeline-component/style.min.css'; to _app.js file. Thanks.