I uploaded my Markdown Previewer to my GitHub repo and it doesn’t wanna load the script for the marked library.
I first had this problem locally but I solved it by adding the marked library using my command line inside VS Code.
I then added the script that points to the location of my marked lib and everything was working fine:
And now I uploaded my code to GitHub repo and it doesn’t wanna load the script.
Here is a link [GitHub - Gamintor/markdown_previewer.github.io]
So when inspecting the deployment (with Chrome), I noticed that in sources, the no_modules folder was not loaded. Hence, the 404 error on marked.js. A short google search lead me to this stackoverflow answer… Forked from your repo to test it out and it works!
In case the link to the stackOverflow answer gets broken - long story short, Github pages now runs a version of Jekyll that ignores the node_modules folder (by default) and you can fix it by adding an empty .nojekyll file to the root folder
It never came to me that I should look into the sources tab to see that the node modules is not loaded. I only looked inside console.
Thanks a lot!
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.