Code Monkey home page Code Monkey logo

Comments (4)

vasansr avatar vasansr commented on June 16, 2024

The bootstrap files are supposed to come from the static directory. I don't see a static directory in your repo. Also, ensure that you soft-link (or copy, if you are using windows) the bootstrap directory from node_modules/bootstrap/dist as described in Chapter 10, page 208, just before listing 10-1.

from pro-mern-stack.

 avatar commented on June 16, 2024

In chapter 10 you mentioned that windows users should copy the entire dist directory into the static directory. So I had a subdirectory named dist inside of static copied from the bootstrap folder in node_modules https://github.com/edward-hong/pro-mern-stack/tree/master/static/dist. In the gitignore file I had listed the file to ignore any folder named dist to exclude my compiled code. But this excluded the dist file I copied as well. That is why originally you couldn't see the static folder in my git repo because it had been excluded. But this has been fixed.

from pro-mern-stack.

vasansr avatar vasansr commented on June 16, 2024

Your error is typical of the bootstrap.min.css file not being found under expected path. When any route is not resolved, we return a Page Not Found HTML and that is why you are seeing the HTML "template" instead of the CSS.

Your static directory should look like this:

static
  bootstrap
    css
      bootstrap.min.css
      bootstrap.css
      ...
    js
      ...

The instructions missed out the fact that the dist directory has to be copied as bootstrap, not dist itself. Please rename your directory to bootstrap and things should work.

from pro-mern-stack.

 avatar commented on June 16, 2024

Thank you! Everything is working as expected once I renamed the folder dist to bootstrap

from pro-mern-stack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.