Previously netlify site gets page not found error

Hi,
I had a a neltify site that was working but suddenly stopped working and I would get a “page not found error” . My site still works locally. I saw from another post to check for index.js file- and there was. I tried deleting my site and creating a new one but still no avail. This is my URL https://app.netlify.com/sites/vigorous-dijkstra-4c4ca1. Here is my deploy log
9:41:03 AM: Build ready to start
9:41:06 AM: build-image version: 9d79ad851d6eff3969322d6e5b1df3d597650c41
9:41:06 AM: build-image tag: v3.3.19
9:41:06 AM: buildbot version: 8e2e5a3a5212190d0490c1372e313994f9085345
9:41:07 AM: Fetching cached dependencies
9:41:07 AM: Failed to fetch cache, continuing with build
9:41:07 AM: Starting to prepare the repo for build
9:41:07 AM: No cached dependencies found. Cloning fresh repo
9:41:07 AM: git clone https://github.com/yepstien1/pies-and-fries-3
9:41:08 AM: Preparing Git Reference refs/heads/master
9:41:10 AM: Different functions path detected, going to use the one specified in the Netlify configuration file: ‘functions’ versus ‘’ in the Netlify UI
9:41:10 AM: Starting build script
9:41:10 AM: Installing dependencies
9:41:10 AM: Python version set to 2.7
9:41:11 AM: v12.18.0 is already installed.
9:41:12 AM: Now using node v12.18.0 (npm v6.14.4)
9:41:12 AM: Started restoring cached build plugins
9:41:12 AM: Finished restoring cached build plugins
9:41:12 AM: Attempting ruby version 2.7.1, read from environment
9:41:14 AM: Using ruby version 2.7.1
9:41:14 AM: Using PHP version 5.6
9:41:14 AM: 5.2 is already installed.
9:41:14 AM: Using Swift version 5.2
9:41:14 AM: Started restoring cached node modules
9:41:14 AM: Finished restoring cached node modules
9:41:15 AM: Installing NPM modules using NPM version 6.14.4
9:41:55 AM: > core-js@2.6.11 postinstall /opt/build/repo/node_modules/babel-runtime/node_modules/core-js
9:41:55 AM: > node -e “try{require(’./postinstall’)}catch(e){}”
9:41:55 AM: > core-js@3.6.5 postinstall /opt/build/repo/node_modules/core-js
9:41:55 AM: > node -e “try{require(’./postinstall’)}catch(e){}”
9:41:55 AM: > core-js-pure@3.6.5 postinstall /opt/build/repo/node_modules/core-js-pure
9:41:55 AM: > node -e “try{require(’./postinstall’)}catch(e){}”
9:41:58 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/webpack-dev-server/node_modules/fsevents):
9:41:58 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
9:41:58 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/watchpack-chokidar2/node_modules/fsevents):
9:41:58 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
9:41:58 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/jest-haste-map/node_modules/fsevents):
9:41:58 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
9:41:58 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/fsevents):
9:41:58 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
9:41:58 AM: added 1740 packages from 835 contributors and audited 1745 packages in 42.183s
9:41:59 AM: 63 packages are looking for funding
9:41:59 AM: run npm fund for details
9:41:59 AM: found 1 low severity vulnerability
9:41:59 AM: run npm audit fix to fix them, or npm audit for details
9:41:59 AM: NPM modules installed
9:42:00 AM: Started restoring cached go cache
9:42:00 AM: Finished restoring cached go cache
9:42:00 AM: go version go1.14.4 linux/amd64
9:42:00 AM: go version go1.14.4 linux/amd64
9:42:00 AM: Installing missing commands
9:42:00 AM: Verify run directory
9:42:01 AM: ​
9:42:01 AM: ┌─────────────────────────────┐
9:42:01 AM: │ Netlify Build │
9:42:01 AM: └─────────────────────────────┘
9:42:01 AM: ​
9:42:01 AM: ❯ Version
9:42:01 AM: @netlify/build 2.0.20
9:42:01 AM: ​
9:42:01 AM: ❯ Flags
9:42:01 AM: deployId: 5efc926f189c63028ffbcf63
9:42:01 AM: mode: buildbot
9:42:01 AM: ​
9:42:01 AM: ❯ Current directory
9:42:01 AM: /opt/build/repo
9:42:01 AM: ​
9:42:01 AM: ❯ Config file
9:42:01 AM: /opt/build/repo/netlify.toml
9:42:01 AM: ​
9:42:01 AM: ❯ Context
9:42:01 AM: production
9:42:02 AM: ​
9:42:02 AM: ┌────────────────────────────────────┐
9:42:02 AM: │ 1. build.command from netlify.toml │
9:42:02 AM: └────────────────────────────────────┘
9:42:02 AM: ​
9:42:02 AM: $ npm run build
9:42:03 AM: > pies-and-fries3@0.1.0 build /opt/build/repo
9:42:03 AM: > react-scripts build
9:42:04 AM: Creating an optimized production build…
9:42:35 AM: Compiled successfully.
9:42:35 AM:
9:42:35 AM: File sizes after gzip:
9:42:35 AM: 126.19 KB build/static/js/2.e5d3726d.chunk.js
9:42:35 AM: 22.47 KB build/static/css/2.af3c1da9.chunk.css
9:42:35 AM: 3.45 KB build/static/js/main.fae75a1a.chunk.js
9:42:35 AM: 780 B build/static/js/runtime-main.f273c63c.js
9:42:35 AM: 546 B build/static/css/main.8a20913a.chunk.css
9:42:35 AM: The project was built assuming it is hosted at /.
9:42:35 AM: You can control this with the homepage field in your package.json.
9:42:35 AM: The build folder is ready to be deployed.
9:42:35 AM: You may serve it with a static server:
9:42:35 AM: npm install -g serve
9:42:35 AM: serve -s build
9:42:35 AM: Find out more about deployment here:
9:42:35 AM: bit.ly/CRA-deploy
9:42:35 AM: ​
9:42:35 AM: (build.command completed in 32.9s)
9:42:35 AM: ​
9:42:35 AM: ┌────────────────────────────────────────────────────────────┐
9:42:35 AM: │ 2. onPostBuild command from @netlify/plugin-functions-core │
9:42:35 AM: └────────────────────────────────────────────────────────────┘
9:42:35 AM: ​
9:42:35 AM: Packaging Functions from functions directory:
9:42:35 AM: - hello.js
9:42:35 AM: - test.js
9:42:36 AM: ​
9:42:36 AM: (@netlify/plugin-functions-core onPostBuild completed in 299ms)
9:42:36 AM: ​
9:42:36 AM: ┌─────────────────────────────┐
9:42:36 AM: │ Netlify Build Complete │
9:42:36 AM: └─────────────────────────────┘
9:42:36 AM: ​
9:42:36 AM: (Netlify Build completed in 34.7s)
9:42:36 AM: Caching artifacts
9:42:36 AM: Started saving node modules
9:42:36 AM: Finished saving node modules
9:42:36 AM: Started saving build plugins
9:42:36 AM: Finished saving build plugins
9:42:36 AM: Started saving pip cache
9:42:36 AM: Finished saving pip cache
9:42:36 AM: Started saving emacs cask dependencies
9:42:36 AM: Finished saving emacs cask dependencies
9:42:36 AM: Started saving maven dependencies
9:42:36 AM: Finished saving maven dependencies
9:42:36 AM: Started saving boot dependencies
9:42:36 AM: Finished saving boot dependencies
9:42:36 AM: Started saving go dependencies
9:42:36 AM: Finished saving go dependencies
9:42:39 AM: Build script success
9:42:39 AM: Starting to deploy site from ‘src’
9:42:39 AM: Creating deploy tree
9:42:39 AM: Creating deploy upload records
9:42:39 AM: 0 new files to upload
9:42:39 AM: 2 new functions to upload
9:42:40 AM: Starting post processing
9:42:41 AM: Post processing done
9:42:41 AM: Site is live
9:43:04 AM: Finished processing build request in 1m57.476019324s

Hey! So, you’re serving /index.js. Our guide (the one I think you’re referencing) asks you to ensure that you’re serving /index.html.

If I browse to https://vigorous-dijkstra-4c4ca1.netlify.app/index.js, I can see the content. You’ll need to pass this through /index.html :slight_smile:

If you read a guide which did say /index.js, please let me know and I’ll make sure that’s corrected!

My bad, but then why was it working previously and how do i fix that? I am using react?

I can see that this site has only been deployed once. If you’re referencing a different site/repo, you’d need to check for any difference in config or methodology to best understand why that worked and this doesn’t.

I had deleted my old site and recreated in an attempt to fix the problem. oh well.
I dont understand why my index.html file is not being served and how to fix it. its there on my github site . It is under the public folder. I just tried moving index.html to my src folder but doing that causes the build to fail entirely. Thanks

I see there is one site on your account and it loads great for me. Were you able to solve the issue?

Yes ,thank you I had needed to edit my .toml file.