Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

generateAppendClassName: CSS module is undefined

I have a React v15 web app that runs fine at localhost. Yet when I deploy it to GitHub pages, I have a CSS module is undefined error:

enter image description here

I've set up a test repo for this issue: https://github.com/ZeningQu/test-repo/tree/master

If you clone the repo and run yarn start, you should be able to see the load-data-pane component: enter image description here

But when you do yarn run deploy, the GitHub page is basically empty:

enter image description here

More info:

  • load-data-pane component
  • load-data-pane.scss
  • package.json
  • webpack.config.prod.js
like image 857
Zening Qu Avatar asked Apr 29 '18 08:04

Zening Qu


1 Answers

I couldn't get your repo to work in my local machine. However, I've had problems with deploying React application before. One trick I learnt was to put <base href="/"> in the <head> tag in repo/public/index.html. Maybe you can try that and see if it works for you.

like image 111
Alex Luong Avatar answered Oct 14 '22 21:10

Alex Luong