Page Not Found Headache

Hi Everybody,

I need some help. I have a “page not found” issue & have no clue what to do. How can I fix this? It says the site is live, but the page is still not found. FYI I have read that index.html solution suggestion & that does not work.

Netlify Site Name: silly-sammet-8d377c
Netlify URL: https://silly-sammet-8d377c.netlify.app/
Github Repo: GitHub - HTMLbyShanell/weather-app

image

1:09:18 PM: Build ready to start
1:09:20 PM: build-image version: 3571f0130496395a23bffe9820bc78b4f73a6234
1:09:20 PM: build-image tag: v3.7.0
1:09:20 PM: buildbot version: 4b67c14778907027e78150ff5560728bb44534d3
1:09:20 PM: Fetching cached dependencies
1:09:20 PM: Starting to download cache of 405.9KB
1:09:20 PM: Finished downloading cache in 65.245438ms
1:09:20 PM: Starting to extract cache
1:09:20 PM: Finished extracting cache in 29.457675ms
1:09:20 PM: Finished fetching cache in 96.10008ms
1:09:20 PM: Starting to prepare the repo for build
1:09:20 PM: Preparing Git Reference refs/heads/master
1:09:21 PM: Parsing package.json dependencies
1:09:23 PM: No build steps found, continuing to publishing
1:09:23 PM: Starting to deploy site from ‘/’
1:09:23 PM: Creating deploy tree
1:09:23 PM: Creating deploy upload records
1:09:23 PM: 0 new files to upload
1:09:23 PM: 0 new functions to upload
1:09:23 PM: Starting post processing
1:09:23 PM: Post processing - HTML
1:09:23 PM: Post processing - header rules
1:09:23 PM: Post processing - redirect rules
1:09:23 PM: Post processing done
1:09:23 PM: Finished processing build request in 3.370393908s
1:09:23 PM: Site is live :sparkles:

This is a React application using “npm start” to run the app in VS Code. I have played around with the following:

  • _redirects file
  • netlify.toml file
  • setting the publish directory to dist & public
  • writing “npm run build” in the build command

None of the above worked for me so far.

Your base directory should be weather-app and publish path should be build.

1 Like

@ChanelC If you had checked that index.html solution carefully, you would have found the solution yourself. There is no index.html file at the top level of your site. There is this page, though:

https://silly-sammet-8d377c.netlify.app/README.md

Appreciate the feedback. I got success getting rid of the “page not found”, however now my Netlify URL just shows a blank white screen. Below is my new build setting & deploy log.

Netlify Site Name: silly-sammet-8d377c
Netlify URL: https://silly-sammet-8d377c.netlify.app/
Github Repo: GitHub - HTMLbyShanell/weather-app

image

7:35:24 PM: Build ready to start
7:35:26 PM: build-image version: 3571f0130496395a23bffe9820bc78b4f73a6234
7:35:26 PM: build-image tag: v3.7.0
7:35:26 PM: buildbot version: 4b67c14778907027e78150ff5560728bb44534d3
7:35:26 PM: Fetching cached dependencies
7:35:26 PM: Starting to download cache of 113.6MB
7:35:27 PM: Finished downloading cache in 619.778884ms
7:35:27 PM: Starting to extract cache
7:35:34 PM: Finished extracting cache in 6.987173246s
7:35:34 PM: Finished fetching cache in 7.677558444s
7:35:34 PM: Starting to prepare the repo for build
7:35:34 PM: Preparing Git Reference refs/heads/master
7:35:35 PM: Parsing package.json dependencies
7:35:36 PM: Different build dir detected, going to use the one specified in the Netlify configuration file: ‘weather-app’ versus ‘weather-app/’ in the Netlify UI
7:35:36 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: ‘weather-app/public’ versus ‘public/’ in the Netlify UI
7:35:37 PM: Starting build script
7:35:37 PM: Installing dependencies
7:35:37 PM: Python version set to 2.7
7:35:38 PM: Started restoring cached node version
7:35:41 PM: Finished restoring cached node version
7:35:42 PM: v12.18.0 is already installed.
7:35:43 PM: Now using node v12.18.0 (npm v6.14.4)
7:35:43 PM: Started restoring cached build plugins
7:35:43 PM: Finished restoring cached build plugins
7:35:44 PM: Attempting ruby version 2.7.1, read from environment
7:35:46 PM: Using ruby version 2.7.1
7:35:46 PM: Using PHP version 5.6
7:35:46 PM: Started restoring cached node modules
7:35:46 PM: Finished restoring cached node modules
7:35:47 PM: Started restoring cached go cache
7:35:47 PM: Finished restoring cached go cache
7:35:47 PM: go version go1.14.4 linux/amd64
7:35:47 PM: go version go1.14.4 linux/amd64
7:35:47 PM: Installing missing commands
7:35:47 PM: Verify run directory
7:35:49 PM: ​
7:35:49 PM: ────────────────────────────────────────────────────────────────
7:35:49 PM: Netlify Build
7:35:49 PM: ────────────────────────────────────────────────────────────────
7:35:49 PM: ​
7:35:49 PM: ❯ Version
7:35:49 PM: @netlify/build 9.11.1
7:35:49 PM: ​
7:35:49 PM: ❯ Flags
7:35:49 PM: apiHost: api.netlify.com
7:35:49 PM: cacheDir: /opt/build/cache
7:35:49 PM: deployId: 6057e64cfb2bd8b0942bc22a
7:35:49 PM: mode: buildbot
7:35:49 PM: testOpts:
7:35:49 PM: silentLingeringProcesses: ‘’
7:35:49 PM: ​
7:35:49 PM: ❯ Current directory
7:35:49 PM: /opt/build/repo/weather-app
7:35:49 PM: ​
7:35:49 PM: ❯ Config file
7:35:49 PM: No config file was defined: using default values.
7:35:49 PM: ​
7:35:49 PM: ❯ Context
7:35:49 PM: production
7:35:49 PM: ​
7:35:49 PM: ────────────────────────────────────────────────────────────────
7:35:49 PM: 1. Build command from Netlify app
7:35:49 PM: ────────────────────────────────────────────────────────────────
7:35:49 PM: ​
7:35:49 PM: $ npm run build
7:35:50 PM: > weather-app@0.1.0 build /opt/build/repo/weather-app
7:35:50 PM: > react-scripts build
7:35:53 PM: Creating an optimized production build…
7:36:00 PM: Compiled successfully.
7:36:00 PM:
7:36:00 PM: File sizes after gzip:
7:36:00 PM: 41.69 KB build/static/js/2.0909e5bf.chunk.js
7:36:00 PM: 2.14 KB build/static/js/main.bf8230f9.chunk.js
7:36:00 PM: 1.4 KB build/static/js/3.9c76801f.chunk.js
7:36:00 PM: 1.17 KB build/static/js/runtime-main.4a79a5f5.js
7:36:00 PM: 824 B build/static/css/main.39e7d4ed.chunk.css
7:36:00 PM: The project was built assuming it is hosted at /.
7:36:00 PM: You can control this with the homepage field in your package.json.
7:36:00 PM: The build folder is ready to be deployed.
7:36:00 PM: You may serve it with a static server:
7:36:00 PM: npm install -g serve
7:36:00 PM: serve -s build
7:36:00 PM: Find out more about deployment here:
7:36:00 PM: https://cra.link/deployment
7:36:01 PM: ​
7:36:01 PM: (build.command completed in 11.3s)
7:36:01 PM: ​
7:36:01 PM: ────────────────────────────────────────────────────────────────
7:36:01 PM: 2. Deploy site
7:36:01 PM: ────────────────────────────────────────────────────────────────
7:36:01 PM: ​
7:36:01 PM: Starting to deploy site from ‘weather-app/public’
7:36:01 PM: Creating deploy tree
7:36:01 PM: Creating deploy upload records
7:36:01 PM: 0 new files to upload
7:36:01 PM: 0 new functions to upload
7:36:01 PM: Site deploy was successfully initiated
7:36:01 PM: ​
7:36:01 PM: (Deploy site completed in 99ms)
7:36:01 PM: ​
7:36:01 PM: ────────────────────────────────────────────────────────────────
7:36:01 PM: Netlify Build Complete
7:36:01 PM: Starting post processing
7:36:01 PM: ────────────────────────────────────────────────────────────────
7:36:01 PM: ​
7:36:01 PM: (Netlify Build completed in 11.5s)
7:36:01 PM: Post processing - HTML
7:36:01 PM: Post processing - header rules
7:36:01 PM: Post processing - redirect rules
7:36:01 PM: Post processing done
7:36:01 PM: Caching artifacts
7:36:01 PM: Started saving node modules
7:36:01 PM: Finished saving node modules
7:36:01 PM: Started saving build plugins
7:36:01 PM: Finished saving build plugins
7:36:01 PM: Started saving pip cache
7:36:01 PM: Site is live :sparkles:
7:36:01 PM: Finished saving pip cache
7:36:01 PM: Started saving emacs cask dependencies
7:36:01 PM: Finished saving emacs cask dependencies
7:36:01 PM: Started saving maven dependencies
7:36:01 PM: Finished saving maven dependencies
7:36:01 PM: Started saving boot dependencies
7:36:01 PM: Finished saving boot dependencies
7:36:01 PM: Started saving rust rustup cache
7:36:01 PM: Finished saving rust rustup cache
7:36:01 PM: Started saving go dependencies
7:36:01 PM: Finished saving go dependencies
7:36:01 PM: Build script success
7:36:28 PM: Finished processing build request in 1m1.626623515s

UPDATE: It’s working now! Idk what happened, but it allowed me to use build in the publishing path without failing this time. I got rid of the _redirect & netlify.toml files. So maybe that helped too.

For whatever reason my app isn’t fetching weather data via my API in netlify like it does in VS Code, but I’ll play around with my code to fix that some other time.

image

1 Like