Local build returns working site, but netlify deploy returns blank page

Hello,

When I run my npm start locally, my website shows up fine:

But when I run netlify deploy, Deploy path:

C:\Users\mlooff\documents\github\overdawgdata\public
Deploying to main site URL…

  • Hashing files…
    √ Finished hashing 6 files
  • CDN diffing files…
    √ CDN requesting 0 files
  • Uploading 0 files
    √ Finished uploading 0 assets
  • Waiting for deploy to go live…
    √ Deploy is live!

The site shows up blank:

When I checked the dev tools, the site title shows up, but nothing in the body appears.

Any thoughts?

Here is the deploy url: https://601c10216cc7a73c4e00dccc--overdawgdata.netlify.app/

A git repo would be helpful, also can you tell us how you are deploying to Netlify’s CDN:

  • Drag and drop via UI

  • Netlify-cli

  • Git

  • API

Kyle.

Your source answers it:


<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8" />
    <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="theme-color" content="#000000" />
    <meta name="description" content="Web site created using create-react-app" />
    <link rel="apple-touch-icon" href="logo192.png" />
    <!--
      manifest.json provides metadata used when your web app is installed on a
      user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
    -->
    <link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
    <!--
      Notice the use of %PUBLIC_URL% in the tags above.
      It will be replaced with the URL of the `public` folder during the build.
      Only files inside the `public` folder can be referenced from the HTML.

      Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
      work correctly both with client-side routing and a non-root public URL.
      Learn how to configure a non-root public URL by running `npm run build`.
    -->
    <title>Frame - React Template</title>
</head>

<body class="has-animations">
    <noscript>You need to enable JavaScript to run this app.</noscript>
    <div id="root" class="body-wrap"></div>
</body>

</html>

There’s no content in body. Maybe you’re using the wrong build command or something.

1 Like

Thanks, Kyle! I’m deploying through Git - here are the deploy settings:

image

And here is the error I’m getting:

12:37:56 PM: Build ready to start

12:37:58 PM: build-image version: d84c79427e8f83c1ba17bcdd7b3fe38059376b68

12:37:58 PM: build-image tag: v3.6.1

12:37:58 PM: buildbot version: 28b3358b4c94ec0a3a8c81b155535f3f8c2745f1

12:37:58 PM: Fetching cached dependencies

12:37:58 PM: Failed to fetch cache, continuing with build

12:37:58 PM: Starting to prepare the repo for build

12:37:59 PM: No cached dependencies found. Cloning fresh repo

12:37:59 PM: git clone https://github.com/meganlooff/OverDawgData-1

12:38:00 PM: Preparing Git Reference refs/heads/master

12:38:02 PM: Failing build: Failed to parse configuration

12:38:02 PM: Failed during stage ‘Reading and parsing configuration files’:
Base directory does not exist: /opt/build/repo/OverDawgData-1

: exit status 1

12:38:02 PM: Finished processing build request in 3.830832609s

1 Like

Repo here: https://github.com/meganlooff/OverDawgData-1/tree/master

I think your repo is private, if your comfortable then you can add me as a contributor or find a work around that’s best for you!

Base directory doesn’t exist. You have configured it wrongly. Check where your package.json exists. There’s a chance that you’d be wanting to leave that field blank.

1 Like

Just gave you access!

1 Like

Have you tried what @hrishikesh has suggested, let’s make get that out the way before we do any advanced troubleshooting (if we need to).

Just doing a quick check over your repo and everything looks pretty normal so far.

1 Like

Removed language from the base directory and deployed again:

Now I’m seeing the following error:

12:52:55 PM: Build ready to start
12:52:57 PM: build-image version: d84c79427e8f83c1ba17bcdd7b3fe38059376b68
12:52:57 PM: build-image tag: v3.6.1
12:52:57 PM: buildbot version: 28b3358b4c94ec0a3a8c81b155535f3f8c2745f1
12:52:57 PM: Building without cache
12:52:57 PM: Starting to prepare the repo for build
12:52:58 PM: No cached dependencies found. Cloning fresh repo
12:52:58 PM: git clone https://github.com/meganlooff/OverDawgData-1
12:52:59 PM: Preparing Git Reference refs/heads/master
12:53:01 PM: Starting build script
12:53:01 PM: Installing dependencies
12:53:01 PM: Python version set to 2.7
12:53:02 PM: v12.18.0 is already installed.
12:53:03 PM: Now using node v12.18.0 (npm v6.14.4)
12:53:03 PM: Started restoring cached build plugins
12:53:03 PM: Finished restoring cached build plugins
12:53:03 PM: Attempting ruby version 2.7.1, read from environment
12:53:04 PM: Using ruby version 2.7.1
12:53:05 PM: Using PHP version 5.6
12:53:05 PM: Started restoring cached node modules
12:53:05 PM: Finished restoring cached node modules
12:53:05 PM: Started restoring cached yarn cache
12:53:05 PM: Finished restoring cached yarn cache
12:53:05 PM: Installing yarn at version 1.22.4
12:53:05 PM: Installing Yarn!
12:53:05 PM: > Downloading tarball…
12:53:05 PM: [1/2]: https://yarnpkg.com/downloads/1.22.4/yarn-v1.22.4.tar.gz → /tmp/yarn.tar.gz.04or6QEGaD
12:53:05 PM: % Total % Received % Xferd Average Speed Time Time Time Current
12:53:05 PM: Dload Upload Total Spent Left Speed
12:53:05 PM: 0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0
12:53:05 PM: 100 80 100 80 0 0 337 0 --:–:-- --:–:-- --:–:-- 338
12:53:05 PM: 100 93 100 93 0 0 150 0 --:–:-- --:–:-- --:–:-- 150
12:53:06 PM: 0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0
12:53:06 PM: 100 625 100 625 0 0 689 0 --:–:-- --:–:-- --:–:-- 10593
12:53:06 PM: 100 1215k 100 1215k 0 0 970k 0 0:00:01 0:00:01 --:–:-- 970k
12:53:06 PM: [2/2]: https://yarnpkg.com/downloads/1.22.4/yarn-v1.22.4.tar.gz.asc → /tmp/yarn.tar.gz.04or6QEGaD.asc
12:53:06 PM: 100 84 100 84 0 0 1107 0 --:–:-- --:–:-- --:–:-- 1107
12:53:06 PM: 100 97 100 97 0 0 773 0 --:–:-- --:–:-- --:–:-- 773
12:53:06 PM: 100 629 100 629 0 0 4027 0 --:–:-- --:–:-- --:–:-- 4027
12:53:06 PM: 100 1028 100 1028 0 0 6111 0 --:–:-- --:–:-- --:–:-- 6111
12:53:06 PM: > Verifying integrity…
12:53:06 PM: gpg: Signature made Mon 09 Mar 2020 03:52:13 PM UTC using RSA key ID 69475BAA
12:53:06 PM: gpg: Good signature from “Yarn Packaging yarn@dan.cx
12:53:06 PM: gpg: Note: This key has expired!
12:53:06 PM: Primary key fingerprint: 72EC F46A 56B4 AD39 C907 BBB7 1646 B01B 86E5 0310
12:53:06 PM: Subkey fingerprint: 6D98 490C 6F1A CDDD 448E 4595 4F77 6793 6947 5BAA
12:53:06 PM: > GPG signature looks good
12:53:06 PM: > Extracting to ~/.yarn…
12:53:06 PM: > Adding to $PATH…
12:53:07 PM: > Successfully installed Yarn 1.22.4! Please open another terminal where the yarn command will now be available.
12:53:07 PM: Installing NPM modules using Yarn version 1.22.4
12:53:08 PM: yarn install v1.22.4
12:53:08 PM: error package.json: Name contains illegal characters
12:53:08 PM: info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
12:53:08 PM: Error during Yarn install
12:53:08 PM: Build was terminated: Build script returned non-zero exit code: 1
12:53:08 PM: Failing build: Failed to build site
12:53:08 PM: Failed during stage ‘building site’: Build script returned non-zero exit code: 1
12:53:08 PM: Finished processing build request in 10.71061644s

Check the name field in package.json. You might be having - there, which might be illegal character.

1 Like

Another quick one, Can you check what branch Netlify is trying to deploy from via the dashboard UI.

Master branch:

Here are the contents of the package.json:

{
“name”: “OverDawgData”,
“version”: “0.1.0”,
“private”: true,
“dependencies”: {
“classnames”: “^2.2.6”,
“lodash”: “^4.17.15”,
“react”: “^16.9.0”,
“react-dom”: “^16.9.0”,
“react-router-dom”: “^5.0.1”,
“react-scripts”: “3.1.1”,
“sass”: “^1.32.4”
},
“scripts”: {
“start”: “react-scripts start”,
“build”: “react-scripts build”,
“test”: “react-scripts test”,
“eject”: “react-scripts eject”
},
“eslintConfig”: {
“extends”: “react-app”
},
“browserslist”: {
“production”: [
“>0.2%”,
“not dead”,
“not op_mini all”
],
“development”: [
“last 1 chrome version”,
“last 1 firefox version”,
“last 1 safari version”
]
}
}

Could you try changing your build command to

react-scripts build

Sure! Just tried that and now see the following:

1:09:45 PM: Build ready to start
1:09:47 PM: build-image version: d84c79427e8f83c1ba17bcdd7b3fe38059376b68
1:09:47 PM: build-image tag: v3.6.1
1:09:47 PM: buildbot version: 28b3358b4c94ec0a3a8c81b155535f3f8c2745f1
1:09:48 PM: Fetching cached dependencies
1:09:48 PM: Failed to fetch cache, continuing with build
1:09:48 PM: Starting to prepare the repo for build
1:09:48 PM: No cached dependencies found. Cloning fresh repo
1:09:48 PM: git clone https://github.com/meganlooff/OverDawgData-1
1:09:49 PM: Preparing Git Reference refs/heads/master
1:09:51 PM: Starting build script
1:09:51 PM: Installing dependencies
1:09:51 PM: Python version set to 2.7
1:09:53 PM: v12.18.0 is already installed.
1:09:54 PM: Now using node v12.18.0 (npm v6.14.4)
1:09:54 PM: Started restoring cached build plugins
1:09:54 PM: Finished restoring cached build plugins
1:09:54 PM: Attempting ruby version 2.7.1, read from environment
1:09:55 PM: Using ruby version 2.7.1
1:09:56 PM: Using PHP version 5.6
1:09:56 PM: Started restoring cached node modules
1:09:56 PM: Finished restoring cached node modules
1:09:56 PM: Started restoring cached yarn cache
1:09:56 PM: Finished restoring cached yarn cache
1:09:56 PM: Installing yarn at version 1.22.4
1:09:56 PM: Installing Yarn!
1:09:56 PM: > Downloading tarball…
1:09:56 PM: [1/2]: https://yarnpkg.com/downloads/1.22.4/yarn-v1.22.4.tar.gz → /tmp/yarn.tar.gz.K7EQU7K9zj
1:09:56 PM: % Total % Received % Xferd Average Speed Time Time Time Current
1:09:56 PM: Dload Upload Total Spent Left Speed
1:09:56 PM: 0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0
1:09:56 PM: 100 80 100 80 0 0 235 0 --:–:-- --:–:-- --:–:-- 235
1:09:57 PM: 0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0
1:09:57 PM: 100 93 100 93 0 0 121 0 --:–:-- --:–:-- --:–:-- 294
1:09:57 PM: 100 625 100 625 0 0 594 0 0:00:01 0:00:01 --:–:-- 594
1:09:57 PM: 100 1215k 100 1215k 0 0 871k 0 0:00:01 0:00:01 --:–:-- 871k
1:09:57 PM: [2/2]: https://yarnpkg.com/downloads/1.22.4/yarn-v1.22.4.tar.gz.asc → /tmp/yarn.tar.gz.K7EQU7K9zj.asc
1:09:57 PM: 100 84 100 84 0 0 1394 0 --:–:-- --:–:-- --:–:-- 1394
1:09:57 PM: 100 84 100 84 0 0 1391 0 --:–:-- --:–:-- --:–:-- 0
1:09:57 PM: 100 97 100 97 0 0 887 0 --:–:-- --:–:-- --:–:-- 887
1:09:57 PM: 100 629 100 629 0 0 4512 0 --:–:-- --:–:-- --:–:-- 4512
1:09:57 PM: 100 1028 100 1028 0 0 6812 0 --:–:-- --:–:-- --:–:-- 6812
1:09:57 PM: > Verifying integrity…
1:09:57 PM: gpg: Signature made Mon 09 Mar 2020 03:52:13 PM UTC using RSA key ID 69475BAA
1:09:57 PM: gpg: Good signature from “Yarn Packaging yarn@dan.cx
1:09:57 PM: gpg: Note: This key has expired!
1:09:57 PM: Primary key fingerprint: 72EC F46A 56B4 AD39 C907 BBB7 1646 B01B 86E5 0310
1:09:57 PM: Subkey fingerprint: 6D98 490C 6F1A CDDD 448E 4595 4F77 6793 6947 5BAA
1:09:57 PM: > GPG signature looks good
1:09:57 PM: > Extracting to ~/.yarn…
1:09:57 PM: > Adding to PATH... 1:09:58 PM: > Successfully installed Yarn 1.22.4! Please open another terminal where the `yarn` command will now be available. 1:09:58 PM: Installing NPM modules using Yarn version 1.22.4 1:09:59 PM: yarn install v1.22.4 1:09:59 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. 1:09:59 PM: [1/4] Resolving packages... 1:10:00 PM: [2/4] Fetching packages... 1:10:02 PM: warning mini-css-extract-plugin@0.5.0: Invalid bin field for "mini-css-extract-plugin". 1:10:25 PM: info fsevents@2.0.7: The platform "linux" is incompatible with this module. 1:10:25 PM: info "fsevents@2.0.7" is an optional dependency and failed compatibility check. Excluding it from installation. 1:10:25 PM: info fsevents@1.2.13: The platform "linux" is incompatible with this module. 1:10:25 PM: info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation. 1:10:25 PM: info fsevents@2.3.1: The platform "linux" is incompatible with this module. 1:10:25 PM: info "fsevents@2.3.1" is an optional dependency and failed compatibility check. Excluding it from installation. 1:10:25 PM: [3/4] Linking dependencies... 1:10:25 PM: warning "react-scripts > @typescript-eslint/eslint-plugin@1.13.0" has incorrect peer dependency "eslint@^5.0.0". 1:10:25 PM: warning "react-scripts > @typescript-eslint/parser@1.13.0" has incorrect peer dependency "eslint@^5.0.0". 1:10:25 PM: warning "react-scripts > eslint-config-react-app@5.2.1" has incorrect peer dependency "@typescript-eslint/eslint-plugin@2.x". 1:10:25 PM: warning "react-scripts > eslint-config-react-app@5.2.1" has incorrect peer dependency "@typescript-eslint/parser@2.x". 1:10:25 PM: warning "react-scripts > @typescript-eslint/eslint-plugin > tsutils@3.19.1" 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". 1:10:38 PM: [4/4] Building fresh packages... 1:10:39 PM: Done in 39.85s. 1:10:39 PM: NPM modules installed using Yarn 1:10:39 PM: Started restoring cached go cache 1:10:39 PM: Finished restoring cached go cache 1:10:39 PM: go version go1.14.4 linux/amd64 1:10:39 PM: go version go1.14.4 linux/amd64 1:10:39 PM: Installing missing commands 1:10:39 PM: Verify run directory 1:10:41 PM: ​ 1:10:41 PM: ──────────────────────────────────────────────────────────────── 1:10:41 PM: Netlify Build 1:10:41 PM: ──────────────────────────────────────────────────────────────── 1:10:41 PM: ​ 1:10:41 PM: ❯ Version 1:10:41 PM: @netlify/build 8.4.0 1:10:41 PM: ​ 1:10:41 PM: ❯ Flags 1:10:41 PM: deployId: 601c386913e29257d361222a 1:10:41 PM: mode: buildbot 1:10:41 PM: ​ 1:10:41 PM: ❯ Current directory 1:10:41 PM: /opt/build/repo 1:10:41 PM: ​ 1:10:41 PM: ❯ Config file 1:10:41 PM: No config file was defined: using default values. 1:10:41 PM: ​ 1:10:41 PM: ❯ Context 1:10:41 PM: production 1:10:41 PM: ​ 1:10:41 PM: ──────────────────────────────────────────────────────────────── 1:10:41 PM: 1. Build command from Netlify app 1:10:41 PM: ──────────────────────────────────────────────────────────────── 1:10:41 PM: ​ 1:10:41 PM: react-scripts build
1:10:43 PM: Creating an optimized production build…
1:11:05 PM:
1:11:05 PM: Treating warnings as errors because process.env.CI = true.
1:11:05 PM: Most CI servers set it automatically.
1:11:05 PM:
1:11:05 PM: Failed to compile.
1:11:05 PM:
1:11:05 PM: ./src/components/sections/FeaturesSplit.js
1:11:05 PM: Line 179:7: ‘img02Style’ is assigned a value but never used no-unused-vars
1:11:05 PM: Line 187:7: ‘img03Style’ is assigned a value but never used no-unused-vars
1:11:05 PM: ./src/views/Home.js
1:11:05 PM: Line 2:8: ‘HeroSplit’ is defined but never used no-unused-vars
1:11:05 PM: Line 3:8: ‘Clients’ is defined but never used no-unused-vars
1:11:05 PM: Line 5:8: ‘FeaturesTiles’ is defined but never used no-unused-vars
1:11:05 PM: Line 6:8: ‘Pricing’ is defined but never used no-unused-vars
1:11:05 PM: Line 7:8: ‘Cta’ is defined but never used no-unused-vars
1:11:05 PM: ​
1:11:05 PM: ────────────────────────────────────────────────────────────────
1:11:05 PM: “build.command” failed
1:11:05 PM: ────────────────────────────────────────────────────────────────
1:11:05 PM: ​
1:11:05 PM: Error message
1:11:05 PM: Command failed with exit code 1: react-scripts build
1:11:05 PM: ​
1:11:05 PM: Error location
1:11:05 PM: In Build command from Netlify app:
1:11:05 PM: react-scripts build
1:11:05 PM: ​
1:11:05 PM: Resolved config
1:11:05 PM: build:
1:11:05 PM: command: react-scripts build
1:11:05 PM: commandOrigin: ui
1:11:05 PM: publish: /opt/build/repo/public
1:11:05 PM: Caching artifacts
1:11:05 PM: Started saving node modules
1:11:05 PM: Finished saving node modules
1:11:05 PM: Started saving build plugins
1:11:05 PM: Finished saving build plugins
1:11:05 PM: Started saving yarn cache
1:11:05 PM: Finished saving yarn cache
1:11:05 PM: Started saving pip cache
1:11:05 PM: Finished saving pip cache
1:11:05 PM: Started saving emacs cask dependencies
1:11:05 PM: Finished saving emacs cask dependencies
1:11:05 PM: Started saving maven dependencies
1:11:05 PM: Finished saving maven dependencies
1:11:05 PM: Started saving boot dependencies
1:11:05 PM: Finished saving boot dependencies
1:11:05 PM: Started saving rust rustup cache
1:11:05 PM: Finished saving rust rustup cache
1:11:05 PM: Started saving go dependencies
1:11:05 PM: Finished saving go dependencies
1:11:08 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
1:11:08 PM: Failing build: Failed to build site
1:11:08 PM: Failed during stage ‘building site’: Build script returned non-zero exit code: 2
1:11:08 PM: Finished processing build request in 1m20.544210852s

Change it to CI= react-scripts build.

1 Like

So the site did build! But there still isn’t content showing: https://www.overdawgdata.com/

Seems like the src folder and public folder aren’t talking to each other correctly?