Jayden Szekely
Jayden Szekely

Reputation: 11

CSS Not showing when pushed to website but shows on localhost - ReactJS / Gatsby

This is my website, it is not showing any of the styling but on my localhost it shows styling... any ideas? https://jaydenszekely.com/

All looks good to me but I must have missed something.

All my code is here :) https://github.com/deslabcreative/jaydenszekely

My CSS is imported in Layout.JS for anyone wondering :)

Nothing out of the ordinary in log that I notice :)

Please Help!

Upvotes: 0

Views: 72

Answers (1)

talves
talves

Reputation: 14353

I took these steps and it fixed the build:

Removed:

  • .cache
  • node_modules
  • commit the changes to repository

Fixed:

  • added .gitignore (.cache, node_modules)
  • replaced PropTypes.file with PropTypes.string
  • git push all the fixes

Since there is a yarn.lock, Netlify will use yarn to install your dependencies, so no need for node_modules. The .cache is used by Gatsby, but will get created during the build, no need to commit it to the repository.

Upvotes: 1

Related Questions