Search code examples
angulargithubnetlify

Deployment failed with Netlify on my Angular project with github integration


I have my Angular project pushed to github and linked that github repo to my netlify account for continous deployment. But when I open the link to my homepage I see a message from netlify that the link is broken.

Link to the github repo: https://github.com/grgkro/SWAB


Solution

  • In the overview page of my netlify project I had to go to "Site Settings":

    Site Settings

    Here click on "Build & deploy" and enter the build command npm run build (npm install is automatically run by netlify). And also change the build directory. Netlify automatically only has dist/ set as dist folder, but Angular projects get build in the folder build/<project name>, not dist/

    enter image description here