I am getting a page not found when I deploy my site even though the site say's it was published

Hello, I am trying to deploy my site, but no matter what I’ve tried, I still get a page not found error. I have my index.html in my src folder, and I see that I should put it somewhere else but I’m not sure where. Can someone please help me?

The site domain is cute-liger-f1e113.netlify.app/

1:58:25 AM: Build ready to start
1:58:27 AM: build-image version: d7b3dbfb0846505993c9a131894d1858074c90b4 (focal)
1:58:27 AM: build-image tag: v4.10.1
1:58:27 AM: buildbot version: aa4e1c51618610360476c8cb99b22ac3191f186e
1:58:27 AM: Fetching cached dependencies
1:58:27 AM: Failed to fetch cache, continuing with build
1:58:27 AM: Starting to prepare the repo for build
1:58:27 AM: No cached dependencies found. Cloning fresh repo
1:58:27 AM: git clone GitHub - Omarmhammouda/omarmhammouda
1:58:29 AM: Preparing Git Reference refs/heads/master
1:58:29 AM: Parsing package.json dependencies
1:58:30 AM: Starting build script
1:58:30 AM: Installing dependencies
1:58:30 AM: Python version set to 2.7
1:58:30 AM: v16.16.0 is already installed.
1:58:31 AM: Now using node v16.16.0 (npm v8.11.0)
1:58:31 AM: Started restoring cached build plugins
1:58:31 AM: Finished restoring cached build plugins
1:58:31 AM: Attempting ruby version 2.7.2, read from environment
1:58:31 AM: Using ruby version 2.7.2
1:58:31 AM: Using PHP version 8.0
1:58:32 AM: No npm workspaces detected
1:58:32 AM: Started restoring cached node modules
1:58:32 AM: Finished restoring cached node modules
1:58:32 AM: Installing NPM modules using NPM version 8.11.0
1:58:32 AM: npm WARN config tmp This setting is no longer used. npm stores temporary files in a special
1:58:32 AM: npm WARN config location in the cache, and they are managed by
1:58:32 AM: npm WARN config cacache.
1:58:32 AM: npm WARN config tmp This setting is no longer used. npm stores temporary files in a special
1:58:32 AM: npm WARN config location in the cache, and they are managed by
1:58:32 AM: npm WARN config cacache.
1:58:37 AM: npm WARN deprecated source-map-resolve@0.6.0: See GitHub - lydell/source-map-resolve: [DEPRECATED] Resolve the source map and/or sources for a generated file.
1:58:47 AM: added 931 packages, and audited 932 packages in 14s
1:58:47 AM: 108 packages are looking for funding
1:58:47 AM: run npm fund for details
1:58:47 AM: 2 high severity vulnerabilities
1:58:47 AM: To address all issues, run:
1:58:47 AM: npm audit fix
1:58:47 AM: Run npm audit for details.
1:58:47 AM: NPM modules installed
1:58:47 AM: npm WARN config tmp This setting is no longer used. npm stores temporary files in a special
1:58:47 AM: npm WARN config location in the cache, and they are managed by
1:58:47 AM: npm WARN config cacache.
1:58:47 AM: Started restoring cached go cache
1:58:47 AM: Finished restoring cached go cache
1:58:47 AM: Installing Go version 1.17 (requested 1.17)
1:58:51 AM: unset GOOS;
1:58:51 AM: unset GOARCH;
1:58:51 AM: export GOROOT=‘/opt/buildhome/.gimme/versions/go1.17.linux.amd64’;
1:58:51 AM: export PATH=“/opt/buildhome/.gimme/versions/go1.17.linux.amd64/bin:${PATH}”;
1:58:51 AM: go version >&2;
1:58:51 AM: export GIMME_ENV=“/opt/buildhome/.gimme/env/go1.17.linux.amd64.env”
1:58:51 AM: go version go1.17 linux/amd64
1:58:51 AM: Installing missing commands
1:58:51 AM: Verify run directory
1:58:52 AM: ​
1:58:52 AM: ────────────────────────────────────────────────────────────────
1:58:52 AM: Netlify Build
1:58:52 AM: ────────────────────────────────────────────────────────────────
1:58:52 AM: ​
1:58:52 AM: ❯ Version
1:58:52 AM: @netlify/build 27.11.3
1:58:52 AM: ​
1:58:52 AM: ❯ Flags
1:58:52 AM: baseRelDir: true
1:58:52 AM: buildId: 62fb3201d45c6365a3bdaa12
1:58:52 AM: deployId: 62fb3201d45c6365a3bdaa14
1:58:52 AM: ​
1:58:52 AM: ❯ Current directory
1:58:52 AM: /opt/build/repo
1:58:52 AM: ​
1:58:52 AM: ❯ Config file
1:58:52 AM: No config file was defined: using default values.
1:58:52 AM: ​
1:58:52 AM: ❯ Context
1:58:52 AM: production
1:58:52 AM: ​
1:58:52 AM: ────────────────────────────────────────────────────────────────
1:58:52 AM: 1. Build command from Netlify app
1:58:52 AM: ────────────────────────────────────────────────────────────────
1:58:52 AM: ​
1:58:52 AM: $ npm run build
1:58:52 AM: npm WARN config tmp This setting is no longer used. npm stores temporary files in a special
1:58:52 AM: npm WARN config location in the cache, and they are managed by
1:58:52 AM: npm WARN config cacache.
1:58:52 AM: > omarmhammouda@0.0.0 build
1:58:52 AM: > ng build
1:58:54 AM: - Generating browser application bundles (phase: setup)…
1:59:07 AM: :heavy_check_mark: Browser application bundle generation complete.
1:59:07 AM: :heavy_check_mark: Browser application bundle generation complete.
1:59:07 AM: - Copying assets…
1:59:07 AM: :heavy_check_mark: Copying assets complete.
1:59:07 AM: - Generating index html…
1:59:08 AM: :heavy_check_mark: Index html generation complete.
1:59:08 AM: Initial Chunk Files | Names | Raw Size | Estimated Transfer Size
1:59:08 AM: main.2fee8f2c8894873d.js | main | 353.75 kB | 88.74 kB
1:59:08 AM: styles.dfc104b9a3d3137b.css | styles | 74.27 kB | 7.88 kB
1:59:08 AM: polyfills.5035b5345e99f678.js | polyfills | 33.03 kB | 10.60 kB
1:59:08 AM: runtime.71699406eb5fb5fa.js | runtime | 1.05 kB | 593 bytes
1:59:08 AM:
1:59:08 AM: | Initial Total | 462.09 kB | 107.80 kB
1:59:08 AM:
1:59:08 AM: Build at: 2022-08-16T05:59:08.143Z - Hash: 73da8b78ba4d31a7 - Time: 13531ms
1:59:08 AM: ​
1:59:08 AM: (build.command completed in 15.5s)
1:59:08 AM: ​
1:59:08 AM: ────────────────────────────────────────────────────────────────
1:59:08 AM: 2. Deploy site
1:59:08 AM: ────────────────────────────────────────────────────────────────
1:59:08 AM: ​
1:59:08 AM: Starting to deploy site from ‘dist’
1:59:08 AM: Creating deploy tree
1:59:08 AM: Creating deploy upload records
1:59:08 AM: 0 new files to upload
1:59:08 AM: 0 new functions to upload
1:59:08 AM: Site deploy was successfully initiated
1:59:08 AM: ​
1:59:08 AM: (Deploy site completed in 237ms)
1:59:08 AM: ​
1:59:08 AM: ────────────────────────────────────────────────────────────────
1:59:08 AM: Netlify Build Complete
1:59:08 AM: ────────────────────────────────────────────────────────────────
1:59:08 AM: ​
1:59:08 AM: (Netlify Build completed in 15.7s)
1:59:08 AM: Starting post processing
1:59:08 AM: Caching artifacts
1:59:08 AM: Started saving node modules
1:59:08 AM: Finished saving node modules
1:59:08 AM: Started saving build plugins
1:59:08 AM: Finished saving build plugins
1:59:08 AM: Started saving pip cache
1:59:08 AM: Finished saving pip cache
1:59:08 AM: Started saving emacs cask dependencies
1:59:08 AM: Finished saving emacs cask dependencies
1:59:08 AM: Started saving maven dependencies
1:59:08 AM: Finished saving maven dependencies
1:59:08 AM: Started saving boot dependencies
1:59:08 AM: Finished saving boot dependencies
1:59:08 AM: Started saving rust rustup cache
1:59:08 AM: Finished saving rust rustup cache
1:59:08 AM: Started saving go dependencies
1:59:08 AM: Finished saving go dependencies
1:59:08 AM: Post processing - HTML
1:59:09 AM: Post processing - header rules
1:59:09 AM: Build script success
1:59:09 AM: Post processing - redirect rules
1:59:09 AM: Post processing done
1:59:10 AM: Uploading Cache of size 177.8MB
1:59:11 AM: Finished processing build request in 44.100491266s
1:59:12 AM: Site is live :sparkles:

You need to ensure that the result of your build leaves an index.html file in the directory that is set as your Publish directory.

You can download a previous deploy to check what files it contained when it was deployed.

Hey @omarmhammouda

You are deploying the dist directory, however the output path set via the angular.json is dist/omarmhammouda.

So, either change the output path to dist or the publish directory to dist/omarmhammouda and things should (hopefully) look a little better.

1 Like