Home > Blockchain >  Deployment failed with Netlify on my Angular project with github integration
Deployment failed with Netlify on my Angular project with github integration

Time:11-22

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: 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

CodePudding user response:

You should also include _redirects file in your root folder to allow routing in you application. Then, include the file to your assets in angular.json as such:

"assets": [
              "src/assets",
 ]

Inside the file, include this:

/*  /index.html 200
  • Related