Gatsby integration - 'Looks like you've followed a broken link or entered a URL that doesn't exist on this site.'

netlify site name: zesty-creponne-989fd9.netlify.app

I have already read this thread but not found my answer [Support Guide] I’ve deployed my site but I still see "Page not found”

my deploy is successful but netlify subdomain shows page not found.

I originally had my site on Gatsby Cloud and I just moved to Netlify. I linked the site directly to my GitLab repo.

Can someone take a look plz?

@JiyuFang There’s not really enough information provided for a community member to assist you to debug.

If you don’t want to provide more, have you tried using the Deploy File Browser to see what you’ve deployed?

If you provide a full build log and public repo it’d be much faster for someone to assist you.

full build log:

11:57:43 PM: build-image version: fcb0c1b3ada6d25c1cb58e8bc514f5f23cc14f15 (focal)
11:57:43 PM: buildbot version: 949f978097ce456b0ebbd6633df01a071000be30
11:57:44 PM: Fetching cached dependencies
11:57:44 PM: Starting to download cache of 5.5MB
11:57:44 PM: Finished downloading cache in 249ms
11:57:44 PM: Starting to extract cache
11:57:44 PM: Finished extracting cache in 15ms
11:57:44 PM: Finished fetching cache in 311ms
11:57:44 PM: Starting to prepare the repo for build
11:57:45 PM: Preparing Git Reference refs/heads/main
11:57:48 PM: Starting to install dependencies
11:57:51 PM: Python version set to 3.8
11:57:51 PM: Attempting Ruby version 2.7.2, read from environment
11:57:52 PM: Using Ruby version 2.7.2
11:57:52 PM: Started restoring cached go cache
11:57:52 PM: Finished restoring cached go cache
11:57:54 PM: go version go1.19.13 linux/amd64
11:57:54 PM: Using PHP version 8.0
11:57:56 PM: Downloading and installing node v18.19.1...
11:57:56 PM: Downloading https://nodejs.org/dist/v18.19.1/node-v18.19.1-linux-x64.tar.xz...
11:57:56 PM: Computing checksum with sha256sum
11:57:57 PM: Checksums matched!
11:57:59 PM: Now using node v18.19.1 (npm v10.2.4)
11:57:59 PM: Enabling Node.js Corepack
11:57:59 PM: Started restoring cached build plugins
11:57:59 PM: Finished restoring cached build plugins
11:57:59 PM: Started restoring cached corepack dependencies
11:57:59 PM: Finished restoring cached corepack dependencies
11:57:59 PM: Started restoring cached yarn cache
11:57:59 PM: Finished restoring cached yarn cache
11:57:59 PM: No yarn workspaces detected
11:57:59 PM: Started restoring cached node modules
11:57:59 PM: Finished restoring cached node modules
11:58:00 PM: Installing npm packages using Yarn version 1.22.19
11:58:00 PM: yarn install v1.22.19
11:58:00 PM: warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
11:58:00 PM: [1/4] Resolving packages...
11:58:05 PM: [2/4] Fetching packages...
11:58:23 PM: [3/4] Linking dependencies...
11:58:23 PM: warning " > @rhysforyou/gatsby-plugin-safari-site-icon@1.0.2" has incorrect peer dependency "gatsby@2.x".
11:58:23 PM: warning "babel-plugin-styled-components > @babel/plugin-syntax-jsx@7.23.3" has unmet peer dependency "@babel/core@^7.0.0-0".
11:58:23 PM: warning "gatsby > eslint-config-react-app@6.0.0" has incorrect peer dependency "@typescript-eslint/eslint-plugin@^4.0.0".
11:58:23 PM: warning "gatsby > eslint-config-react-app@6.0.0" has incorrect peer dependency "@typescript-eslint/parser@^4.0.0".
11:58:23 PM: warning "gatsby > eslint-config-react-app@6.0.0" has unmet peer dependency "babel-eslint@^10.0.0".
11:58:23 PM: warning "gatsby > react-server-dom-webpack@0.0.0-experimental-c8b778b7f-20220825" has incorrect peer dependency "react@0.0.0-experimental-c8b778b7f-20220825".
11:58:23 PM: warning "gatsby > @typescript-eslint/eslint-plugin > tsutils@3.21.0" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
11:58:23 PM: warning "gatsby > react-dev-utils > fork-ts-checker-webpack-plugin@6.5.3" has unmet peer dependency "typescript@>= 2.7".
11:58:23 PM: warning " > gatsby-background-image@1.6.0" has incorrect peer dependency "gatsby@^2.0.0 || ^3.0.0 || ^4.0.0".
11:58:23 PM: warning " > gatsby-plugin-gatsby-cloud@5.10.0" has unmet peer dependency "webpack@*".
11:58:23 PM: warning "gatsby-plugin-gatsby-cloud > webpack-assets-manifest@5.1.0" has unmet peer dependency "webpack@^5.2.0".
11:58:23 PM: warning " > gatsby-plugin-image@3.13.1" has unmet peer dependency "@babel/core@^7.12.3".
11:58:23 PM: warning "gatsby-plugin-image > gatsby-plugin-utils@4.13.1" has unmet peer dependency "graphql@^16.0.0".
11:58:23 PM: warning "gatsby-plugin-image > babel-plugin-remove-graphql-queries@5.13.1" has unmet peer dependency "@babel/core@^7.0.0".
11:58:23 PM: warning " > gatsby-source-buzzsprout@0.3.1" has incorrect peer dependency "gatsby@^2.0.0".
11:58:23 PM: warning " > react-moment@1.1.3" has unmet peer dependency "prop-types@^15.7.0".
11:58:23 PM: warning " > styled-components@5.3.11" has unmet peer dependency "react-is@>= 16.8.0".
11:58:23 PM: warning " > gatsby-plugin-favicons@2.0.0" has incorrect peer dependency "react@^16.8.0".
11:58:23 PM: warning " > gatsby-plugin-favicons@2.0.0" has unmet peer dependency "webpack@^4.0.0".
11:58:23 PM: warning "gatsby-plugin-favicons > favicons-webpack-plugin@4.2.0" has unmet peer dependency "webpack@^4.0.0".
11:58:23 PM: warning "gatsby-plugin-favicons > favicons-webpack-plugin > cache-loader@4.1.0" has unmet peer dependency "webpack@^4.0.0".
11:58:23 PM: warning "gatsby-plugin-favicons > favicons-webpack-plugin > html-webpack-plugin@5.5.1" has unmet peer dependency "webpack@^5.20.0".
11:58:23 PM: warning Workspaces can only be enabled in private projects.
11:58:35 PM: [4/4] Building fresh packages...
11:58:39 PM: success Saved lockfile.
11:58:39 PM: Done in 39.02s.
11:58:39 PM: npm packages installed using Yarn
11:58:40 PM: Starting post processing
11:58:40 PM: Skipping form detection
11:58:40 PM: Post processing - header rules
11:58:40 PM: Post processing - redirect rules
11:58:40 PM: Post processing done
11:58:40 PM: Section completed: postprocessing
11:58:40 PM: Successfully installed dependencies
11:58:40 PM: No build steps found, continuing to publishing
11:58:40 PM: Starting to deploy site from ""
11:58:40 PM: Calculating files to upload
11:58:40 PM: 0 new files to upload
11:58:40 PM: 0 new functions to upload
11:58:40 PM: Section completed: deploying
11:58:40 PM: Section completed: building
11:58:41 PM: Site is live ✨
11:58:41 PM: Uploading Cache of size 5.5MB
11:58:42 PM: Section completed: cleanup
11:58:42 PM: Finished processing build request in 58.434s

gitlab repo:

@JiyuFang I can see the issue immediately from the build log alone:

11:58:40 PM: Starting to deploy site from ""

You’re deploying the root of your repository, which will be ‘everything including your source files’, so you’ve deployed things like:

https://zesty-creponne-989fd9.netlify.app/README.md
https://zesty-creponne-989fd9.netlify.app/gatsby-config.js
https://zesty-creponne-989fd9.netlify.app/src/components/layout.js
...

When running npm run build your Gatsby based build produces a public folder, so this is what you should deploy on Netlify.

Adjust your Build Configuration to set your Publish Directory to public

Thanks Nathan, but now its throwing me ‘Deploy directory “public” does not exist’

9:53:58 AM: build-image version: fcb0c1b3ada6d25c1cb58e8bc514f5f23cc14f15 (focal)
9:53:58 AM: buildbot version: 949f978097ce456b0ebbd6633df01a071000be30
9:53:59 AM: Fetching cached dependencies
9:53:59 AM: Starting to download cache of 5.5MB
9:53:59 AM: Finished downloading cache in 211ms
9:53:59 AM: Starting to extract cache
9:53:59 AM: Finished extracting cache in 12ms
9:53:59 AM: Finished fetching cache in 274ms
9:53:59 AM: Starting to prepare the repo for build
9:54:00 AM: Preparing Git Reference refs/heads/main
9:54:02 AM: Starting to install dependencies
9:54:04 AM: Python version set to 3.8
9:54:04 AM: Attempting Ruby version 2.7.2, read from environment
9:54:05 AM: Using Ruby version 2.7.2
9:54:05 AM: Started restoring cached go cache
9:54:05 AM: Finished restoring cached go cache
9:54:07 AM: go version go1.19.13 linux/amd64
9:54:07 AM: Using PHP version 8.0
9:54:09 AM: Downloading and installing node v18.19.1...
9:54:09 AM: Downloading https://nodejs.org/dist/v18.19.1/node-v18.19.1-linux-x64.tar.xz...
9:54:10 AM: Computing checksum with sha256sum
9:54:10 AM: Checksums matched!
9:54:12 AM: Now using node v18.19.1 (npm v10.2.4)
9:54:12 AM: Enabling Node.js Corepack
9:54:12 AM: Started restoring cached build plugins
9:54:12 AM: Finished restoring cached build plugins
9:54:12 AM: Started restoring cached corepack dependencies
9:54:12 AM: Finished restoring cached corepack dependencies
9:54:12 AM: Started restoring cached yarn cache
9:54:12 AM: Finished restoring cached yarn cache
9:54:12 AM: No yarn workspaces detected
9:54:12 AM: Started restoring cached node modules
9:54:12 AM: Finished restoring cached node modules
9:54:12 AM: Installing npm packages using Yarn version 1.22.19
9:54:13 AM: yarn install v1.22.19
9:54:13 AM: warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
9:54:13 AM: [1/4] Resolving packages...
9:54:17 AM: [2/4] Fetching packages...
9:54:31 AM: [3/4] Linking dependencies...
9:54:31 AM: warning " > @rhysforyou/gatsby-plugin-safari-site-icon@1.0.2" has incorrect peer dependency "gatsby@2.x".
9:54:31 AM: warning "babel-plugin-styled-components > @babel/plugin-syntax-jsx@7.23.3" has unmet peer dependency "@babel/core@^7.0.0-0".
9:54:31 AM: warning "gatsby > eslint-config-react-app@6.0.0" has incorrect peer dependency "@typescript-eslint/eslint-plugin@^4.0.0".
9:54:31 AM: warning "gatsby > eslint-config-react-app@6.0.0" has incorrect peer dependency "@typescript-eslint/parser@^4.0.0".
9:54:31 AM: warning "gatsby > eslint-config-react-app@6.0.0" has unmet peer dependency "babel-eslint@^10.0.0".
9:54:31 AM: warning "gatsby > react-server-dom-webpack@0.0.0-experimental-c8b778b7f-20220825" has incorrect peer dependency "react@0.0.0-experimental-c8b778b7f-20220825".
9:54:31 AM: warning "gatsby > @typescript-eslint/eslint-plugin > tsutils@3.21.0" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
9:54:31 AM: warning "gatsby > react-dev-utils > fork-ts-checker-webpack-plugin@6.5.3" has unmet peer dependency "typescript@>= 2.7".
9:54:31 AM: warning " > gatsby-background-image@1.6.0" has incorrect peer dependency "gatsby@^2.0.0 || ^3.0.0 || ^4.0.0".
9:54:31 AM: warning " > gatsby-plugin-gatsby-cloud@5.10.0" has unmet peer dependency "webpack@*".
9:54:31 AM: warning "gatsby-plugin-gatsby-cloud > webpack-assets-manifest@5.1.0" has unmet peer dependency "webpack@^5.2.0".
9:54:31 AM: warning " > gatsby-plugin-image@3.13.1" has unmet peer dependency "@babel/core@^7.12.3".
9:54:31 AM: warning "gatsby-plugin-image > babel-plugin-remove-graphql-queries@5.13.1" has unmet peer dependency "@babel/core@^7.0.0".
9:54:31 AM: warning "gatsby-plugin-image > gatsby-plugin-utils@4.13.1" has unmet peer dependency "graphql@^16.0.0".
9:54:31 AM: warning " > gatsby-source-buzzsprout@0.3.1" has incorrect peer dependency "gatsby@^2.0.0".
9:54:31 AM: warning " > react-moment@1.1.3" has unmet peer dependency "prop-types@^15.7.0".
9:54:31 AM: warning " > styled-components@5.3.11" has unmet peer dependency "react-is@>= 16.8.0".
9:54:31 AM: warning " > gatsby-plugin-favicons@2.0.0" has incorrect peer dependency "react@^16.8.0".
9:54:31 AM: warning " > gatsby-plugin-favicons@2.0.0" has unmet peer dependency "webpack@^4.0.0".
9:54:31 AM: warning "gatsby-plugin-favicons > favicons-webpack-plugin@4.2.0" has unmet peer dependency "webpack@^4.0.0".
9:54:31 AM: warning "gatsby-plugin-favicons > favicons-webpack-plugin > cache-loader@4.1.0" has unmet peer dependency "webpack@^4.0.0".
9:54:31 AM: warning "gatsby-plugin-favicons > favicons-webpack-plugin > html-webpack-plugin@5.5.1" has unmet peer dependency "webpack@^5.20.0".
9:54:31 AM: warning Workspaces can only be enabled in private projects.
9:54:42 AM: [4/4] Building fresh packages...
9:54:46 AM: success Saved lockfile.
9:54:46 AM: Done in 33.45s.
9:54:46 AM: npm packages installed using Yarn
9:54:47 AM: Successfully installed dependencies
9:54:47 AM: No build steps found, continuing to publishing
9:54:47 AM: Failing build: Failed to build site
9:54:47 AM: Finished processing build request in 48.67s
9:54:47 AM: Failed during stage "building site": Deploy directory "public" does not exist

@JiyuFang Your site definitely produces a public folder, which I hosted locally with npx serve.

image

However it’s likely that I’m just giving you incorrect information as I don’t work with Gatsby.

Checking the documentation indicates that when Netlify detect it, they automatically install other packages and determine settings, so you should probably read the documentation for it closely.

https://docs.netlify.com/integrations/frameworks/gatsby/?gatsby-version=essential#netlify-integration

I see

9:54:47 AM: No build steps found, continuing to publishing

should I specify a build command?

@JiyuFang I can’t say for certain, due to the “Gatsby on Netlify” documentation saying:

When you link a repository for a project, Netlify detects the framework your site is using. If you are using Gatsby version 5.11.0 or earlier, Netlify will automatically install the Essential Gatsby build plugin and provides suggested configuration values. For existing sites already linked to Netlify, you can choose to install the plugin yourself.

However if you are configuring things yourself, then yes you would set your Build command to CI= npm run build

ok add npm run build to build command works.

Thanks!

Hi :wave:t6: glad to hear you got your site running.