Search code examples
githubgithub-pages

How can I serve files under node_modules with GitHub Pages?


github pages won't serve my node_modules files (gives 404's), despite the special attention i've provided to it

  1. github project https://github.com/open-history/sandbox
  2. hosted on github pages https://open-history.github.io/sandbox/
    (notice the 404's)
  3. i've tracked the node_modules files i want into the repository
  4. i've added the empty .nojekyll file (the previously established solution)

i must be missing something, since so many other users seem to be doing the same thing, most of which report success after adding .nojekyll


Solution

  • Just sit back, and have a rum

    • it turns out, github pages just employs some serverside caching, and it can take hours to begin serving up new files

    • all i needed to do, was wait it out

    • interestingly, the node_module files were available via a curl request for awhile before my web browsers could finally see the fruits of my labor — see relevant comments in this github issue https://github.com/isaacs/github/issues/844