Unable to view my published site

My site is getting deployed but showing Cannot GET / error.
Link: https://spontaneous-croquembouche-0ac4d4.netlify.app/
git: GitHub - naidu-kotha/College-client

Deploy log

4:35:06 PM: build-image version: cd0a67ec27b8bcd87e2a257fe5ebcf1900a8021d (focal)
4:35:06 PM: buildbot version: f3871d4c438bbd4f48a8f44a50bec7489430735e
4:35:06 PM: Building without cache
4:35:06 PM: Starting to prepare the repo for build
4:35:06 PM: No cached dependencies found. Cloning fresh repo
4:35:06 PM: git clone --filter=blob:none https://github.com/naidu-kotha/College-client
4:35:07 PM: Preparing Git Reference refs/heads/master
4:35:07 PM: Parsing package.json dependencies
4:35:08 PM: Different build dir detected, going to use the one specified in the Netlify configuration file: '' versus '/' in the Netlify UI
4:35:09 PM: Starting to install dependencies
4:35:09 PM: Python version set to 3.8
4:35:09 PM: Attempting Ruby version 2.7.2, read from environment
4:35:10 PM: Using Ruby version 2.7.2
4:35:10 PM: Started restoring cached go cache
4:35:10 PM: Finished restoring cached go cache
4:35:10 PM: Installing Go version 1.19.5 (requested 1.19.5)
4:35:15 PM: go version go1.19.5 linux/amd64
4:35:15 PM: Using PHP version 8.0
4:35:16 PM: v16.20.0 is already installed.
4:35:17 PM: Now using node v16.20.0 (npm v8.19.4)
4:35:17 PM: Enabling Node.js Corepack
4:35:17 PM: Started restoring cached build plugins
4:35:17 PM: Finished restoring cached build plugins
4:35:17 PM: Started restoring cached corepack dependencies
4:35:17 PM: Finished restoring cached corepack dependencies
4:35:17 PM: No npm workspaces detected
4:35:17 PM: Started restoring cached node modules
4:35:17 PM: Finished restoring cached node modules
4:35:17 PM: Installing npm packages using npm version 8.19.4
4:35:19 PM: npm WARN ERESOLVE overriding peer dependency
4:35:19 PM: npm WARN While resolving: focus-trap-react@7.0.1
4:35:19 PM: npm WARN Found: react@18.2.0
4:35:19 PM: npm WARN node_modules/react
4:35:19 PM: npm WARN   react@"^18.2.0" from the root project
4:35:19 PM: npm WARN   30 more (@react-aria/ssr, @restart/context, @restart/hooks, ...)
4:35:19 PM: npm WARN
4:35:19 PM: npm WARN Could not resolve dependency:
4:35:19 PM: npm WARN peer react@"^16.0.0" from focus-trap-react@7.0.1
4:35:19 PM: npm WARN node_modules/cdbreact/node_modules/focus-trap-react
4:35:19 PM: npm WARN   focus-trap-react@"^7.0.1" from cdbreact@1.5.14
4:35:19 PM: npm WARN   node_modules/cdbreact
4:35:19 PM: npm WARN
4:35:19 PM: npm WARN Conflicting peer dependency: react@16.14.0
4:35:19 PM: npm WARN node_modules/react
4:35:19 PM: npm WARN   peer react@"^16.0.0" from focus-trap-react@7.0.1
4:35:19 PM: npm WARN   node_modules/cdbreact/node_modules/focus-trap-react
4:35:19 PM: npm WARN     focus-trap-react@"^7.0.1" from cdbreact@1.5.14
4:35:19 PM: npm WARN     node_modules/cdbreact
4:35:19 PM: npm WARN ERESOLVE overriding peer dependency
4:35:19 PM: npm WARN While resolving: focus-trap-react@7.0.1
4:35:19 PM: npm WARN Found: react-dom@18.2.0
4:35:19 PM: npm WARN node_modules/react-dom
4:35:19 PM: npm WARN   react-dom@"^18.2.0" from the root project
4:35:19 PM: npm WARN   19 more (@restart/ui, @testing-library/react, cdbreact, ...)
4:35:19 PM: npm WARN
4:35:19 PM: npm WARN Could not resolve dependency:
4:35:19 PM: npm WARN peer react-dom@"^16.0.0" from focus-trap-react@7.0.1
4:35:19 PM: npm WARN node_modules/cdbreact/node_modules/focus-trap-react
4:35:19 PM: npm WARN   focus-trap-react@"^7.0.1" from cdbreact@1.5.14
4:35:19 PM: npm WARN   node_modules/cdbreact
4:35:19 PM: npm WARN
4:35:19 PM: npm WARN Conflicting peer dependency: react-dom@16.14.0
4:35:19 PM: npm WARN node_modules/react-dom
4:35:19 PM: npm WARN   peer react-dom@"^16.0.0" from focus-trap-react@7.0.1
4:35:19 PM: npm WARN   node_modules/cdbreact/node_modules/focus-trap-react
4:35:19 PM: npm WARN     focus-trap-react@"^7.0.1" from cdbreact@1.5.14
4:35:19 PM: npm WARN     node_modules/cdbreact
4:35:19 PM: npm WARN ERESOLVE overriding peer dependency
4:35:19 PM: npm WARN While resolving: react-bootstrap-range-slider@1.2.2
4:35:19 PM: npm WARN Found: react@18.2.0
4:35:19 PM: npm WARN node_modules/react
4:35:19 PM: npm WARN   react@"^18.2.0" from the root project
4:35:19 PM: npm WARN   30 more (@react-aria/ssr, @restart/context, @restart/hooks, ...)
4:35:19 PM: npm WARN
4:35:19 PM: npm WARN Could not resolve dependency:
4:35:19 PM: npm WARN peer react@"^16.8.0" from react-bootstrap-range-slider@1.2.2
4:35:19 PM: npm WARN node_modules/cdbreact/node_modules/react-bootstrap-range-slider
4:35:19 PM: npm WARN   react-bootstrap-range-slider@"^1.2.1" from cdbreact@1.5.14
4:35:19 PM: npm WARN   node_modules/cdbreact
4:35:19 PM: npm WARN
4:35:19 PM: npm WARN Conflicting peer dependency: react@16.14.0
4:35:19 PM: npm WARN node_modules/react
4:35:19 PM: npm WARN   peer react@"^16.8.0" from react-bootstrap-range-slider@1.2.2
4:35:19 PM: npm WARN   node_modules/cdbreact/node_modules/react-bootstrap-range-slider
4:35:19 PM: npm WARN     react-bootstrap-range-slider@"^1.2.1" from cdbreact@1.5.14
4:35:19 PM: npm WARN     node_modules/cdbreact
4:35:19 PM: npm WARN ERESOLVE overriding peer dependency
4:35:19 PM: npm WARN While resolving: react-bootstrap-range-slider@1.2.2
4:35:19 PM: npm WARN Found: react-dom@18.2.0
4:35:19 PM: npm WARN node_modules/react-dom
4:35:19 PM: npm WARN   react-dom@"^18.2.0" from the root project
4:35:19 PM: npm WARN   19 more (@restart/ui, @testing-library/react, cdbreact, ...)
4:35:19 PM: npm WARN
4:35:19 PM: npm WARN Could not resolve dependency:
4:35:19 PM: npm WARN peer react-dom@"^16.8.0" from react-bootstrap-range-slider@1.2.2
4:35:19 PM: npm WARN node_modules/cdbreact/node_modules/react-bootstrap-range-slider
4:35:19 PM: npm WARN   react-bootstrap-range-slider@"^1.2.1" from cdbreact@1.5.14
4:35:19 PM: npm WARN   node_modules/cdbreact
4:35:19 PM: npm WARN
4:35:19 PM: npm WARN Conflicting peer dependency: react-dom@16.14.0
4:35:19 PM: npm WARN node_modules/react-dom
4:35:19 PM: npm WARN   peer react-dom@"^16.8.0" from react-bootstrap-range-slider@1.2.2
4:35:19 PM: npm WARN   node_modules/cdbreact/node_modules/react-bootstrap-range-slider
4:35:19 PM: npm WARN     react-bootstrap-range-slider@"^1.2.1" from cdbreact@1.5.14
4:35:19 PM: npm WARN     node_modules/cdbreact
4:35:19 PM: npm WARN ERESOLVE overriding peer dependency
4:35:19 PM: npm WARN While resolving: react-chartjs-2@2.11.2
4:35:19 PM: npm WARN Found: react@18.2.0
4:35:19 PM: npm WARN node_modules/react
4:35:19 PM: npm WARN   react@"^18.2.0" from the root project
4:35:19 PM: npm WARN   30 more (@react-aria/ssr, @restart/context, @restart/hooks, ...)
4:35:19 PM: npm WARN
4:35:19 PM: npm WARN Could not resolve dependency:
4:35:19 PM: npm WARN peer react@"^0.14.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" from react-chartjs-2@2.11.2
4:35:19 PM: npm WARN node_modules/cdbreact/node_modules/react-chartjs-2
4:35:19 PM: npm WARN   react-chartjs-2@"^2.10.0" from cdbreact@1.5.14
4:35:19 PM: npm WARN   node_modules/cdbreact
4:35:19 PM: npm WARN
4:35:19 PM: npm WARN Conflicting peer dependency: react@17.0.2
4:35:19 PM: npm WARN node_modules/react
4:35:19 PM: npm WARN   peer react@"^0.14.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" from react-chartjs-2@2.11.2
4:35:19 PM: npm WARN   node_modules/cdbreact/node_modules/react-chartjs-2
4:35:19 PM: npm WARN     react-chartjs-2@"^2.10.0" from cdbreact@1.5.14
4:35:19 PM: npm WARN     node_modules/cdbreact
4:35:19 PM: npm WARN ERESOLVE overriding peer dependency
4:35:19 PM: npm WARN While resolving: react-chartjs-2@2.11.2
4:35:19 PM: npm WARN Found: react-dom@18.2.0
4:35:19 PM: npm WARN node_modules/react-dom
4:35:19 PM: npm WARN   react-dom@"^18.2.0" from the root project
4:35:19 PM: npm WARN   19 more (@restart/ui, @testing-library/react, cdbreact, ...)
4:35:19 PM: npm WARN
4:35:19 PM: npm WARN Could not resolve dependency:
4:35:19 PM: npm WARN peer react-dom@"^0.14.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" from react-chartjs-2@2.11.2
4:35:19 PM: npm WARN node_modules/cdbreact/node_modules/react-chartjs-2
4:35:19 PM: npm WARN   react-chartjs-2@"^2.10.0" from cdbreact@1.5.14
4:35:19 PM: npm WARN   node_modules/cdbreact
4:35:19 PM: npm WARN
4:35:19 PM: npm WARN Conflicting peer dependency: react-dom@17.0.2
4:35:19 PM: npm WARN node_modules/react-dom
4:35:19 PM: npm WARN   peer react-dom@"^0.14.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" from react-chartjs-2@2.11.2
4:35:19 PM: npm WARN   node_modules/cdbreact/node_modules/react-chartjs-2
4:35:19 PM: npm WARN     react-chartjs-2@"^2.10.0" from cdbreact@1.5.14
4:35:19 PM: npm WARN     node_modules/cdbreact
4:35:23 PM: npm WARN deprecated w3c-hr-time@1.0.2: Use your platform's native performance.now() and performance.timeOrigin.npm WARN deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
4:35:23 PM: npm WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead
4:35:23 PM: npm WARN deprecated rollup-plugin-terser@7.0.2: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-terser
4:35:26 PM: npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
4:35:28 PM: npm WARN deprecated popper.js@1.16.1: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1
4:35:38 PM: > college-client@1 prepare
4:35:38 PM: > husky install
4:35:38 PM: husky - Git hooks installed
4:35:38 PM: added 1578 packages, and audited 1579 packages in 21s
4:35:38 PM: 245 packages are looking for funding
4:35:38 PM:   run `npm fund` for details
4:35:38 PM: 6 high severity vulnerabilities
4:35:38 PM: To address all issues (including breaking changes), run:
4:35:38 PM:   npm audit fix --force
4:35:38 PM: Run `npm audit` for details.
4:35:38 PM: npm packages installed
4:35:39 PM: Install dependencies script success
4:35:39 PM: Starting build script
4:35:40 PM: Detected 1 framework(s)
4:35:40 PM: "create-react-app" at version "5.0.1"
4:35:40 PM: Section completed: initializing
4:35:41 PM: ​
4:35:41 PM:   Netlify Build                                                 
4:35:41 PM: ────────────────────────────────────────────────────────────────
4:35:41 PM: ​
4:35:41 PM: ❯ Version
4:35:41 PM:   @netlify/build 29.10.1
4:35:41 PM: ​
4:35:41 PM: ❯ Flags
4:35:41 PM:   baseRelDir: true
4:35:41 PM:   buildId: 6454e2d1c348c80a6d2b7265
4:35:41 PM:   deployId: 6454e2d1c348c80a6d2b7267
4:35:41 PM: ​
4:35:41 PM: ❯ Current directory
4:35:41 PM:   /opt/build/repo
4:35:41 PM: ​
4:35:41 PM: ❯ Config file
4:35:41 PM:   /opt/build/repo/netlify.toml
4:35:41 PM: ​
4:35:41 PM: ❯ Context
4:35:41 PM:   production
4:35:41 PM: ​
4:35:41 PM:   1. Build command from Netlify app                             
4:35:41 PM: ────────────────────────────────────────────────────────────────
4:35:41 PM: ​
4:35:41 PM: $ npm run build
4:35:41 PM: > college-client@1 build
4:35:41 PM: > react-scripts build
4:35:42 PM: Creating an optimized production build...
4:36:21 PM: Compiled successfully.
4:36:21 PM: 
4:36:21 PM: File sizes after gzip:
4:36:21 PM:   346.1 kB  build/static/js/main.6836801c.js
4:36:21 PM:   58.67 kB  build/static/css/main.1b5d318d.css
4:36:21 PM:   1.78 kB   build/static/js/787.525c19e1.chunk.js
4:36:21 PM: The project was built assuming it is hosted at /.
4:36:21 PM: You can control this with the homepage field in your package.json.
4:36:21 PM: The build folder is ready to be deployed.
4:36:21 PM: You may serve it with a static server:
4:36:21 PM:   npm install -g serve
4:36:21 PM:   serve -s build
4:36:21 PM: Find out more about deployment here:
4:36:21 PM:   https://cra.link/deployment
4:36:21 PM: ​
4:36:21 PM: (build.command completed in 40.2s)
4:36:22 PM: Starting post processing
4:36:21 PM: ​
4:36:21 PM:   2. Deploy site                                                
4:36:21 PM: ────────────────────────────────────────────────────────────────
4:36:22 PM: Post processing - HTML
4:36:21 PM: ​
4:36:21 PM: Starting to deploy site from 'build'
4:36:21 PM: Calculating files to upload
4:36:21 PM: 0 new files to upload
4:36:21 PM: 0 new functions to upload
4:36:22 PM: Post processing - header rules
4:36:21 PM: Section completed: deploying
4:36:21 PM: Site deploy was successfully initiated
4:36:21 PM: ​
4:36:21 PM: (Deploy site completed in 99ms)
4:36:22 PM: Post processing - redirect rules
4:36:21 PM: ​
4:36:21 PM:   Netlify Build Complete                                        
4:36:21 PM: ────────────────────────────────────────────────────────────────
4:36:21 PM: ​
4:36:21 PM: (Netlify Build completed in 40.3s)
4:36:22 PM: Caching artifacts
4:36:22 PM: Started saving node modules
4:36:22 PM: Finished saving node modules
4:36:22 PM: Started saving build plugins
4:36:22 PM: Finished saving build plugins
4:36:23 PM: Post processing done
4:36:22 PM: Started saving corepack cache
4:36:22 PM: Finished saving corepack cache
4:36:22 PM: Started saving pip cache
4:36:22 PM: Finished saving pip cache
4:36:23 PM: Section completed: postprocessing
4:36:22 PM: Started saving emacs cask dependencies
4:36:22 PM: Finished saving emacs cask dependencies
4:36:22 PM: Started saving maven dependencies
4:36:22 PM: Finished saving maven dependencies
4:36:22 PM: Started saving boot dependencies
4:36:22 PM: Finished saving boot dependencies
4:36:22 PM: Started saving rust rustup cache
4:36:22 PM: Finished saving rust rustup cache
4:36:22 PM: Started saving go dependencies
4:36:22 PM: Finished saving go dependencies
4:36:22 PM: Build script success
4:36:23 PM: Site is live ✨
4:36:22 PM: Section completed: building
4:36:24 PM: Uploading Cache of size 138.2MB
4:36:25 PM: Section completed: cleanup
4:36:25 PM: Finished processing build request in 1m18.665s

Hi @naidukotha, thanks for the post and welcome.
Looks like you added a redirect from your site to https://college-test-server.onrender.com
The site you are redirecting to responds with a 404 hence the reason your site is not displaying.

If you own the website https://college-test-server.onrender.com kindly fix the problem there instead.
Also test your site without a redirect and make sure is displaying in order to rule out any other problems which might be existing on your main website as well.

Thanks.

The site https://college-test-server.onrender.com is responding with 404 because I didn’t configure the β€œ/” route to return any response. Most of my APIs are POST requests and they are working fine. https://college-test-server.onrender.com/getstudentscount This is one such β€œPOST” request which is working and returning a response when checked with POSTMAN app.

I have also checked by removing the β€œTOML” file and now the site is working. https://spontaneous-croquembouche-0ac4d4.netlify.app/.

What should I do to fix this?

What are you trying to do @naidukotha? Do you wish to redirect to Render, or not? If you redirect, whatever happens on Render’s side is not something we can control. Please explain how your app is setup.

1 Like