Netlify Noob - Minified React error #130

So, when I run gatsby develop OR gatsby clean && gatsby build && gatsby serve, everything works fine: no errors at all.

If I FTP the files in the public folder to my own web server, everything works fine: no errors at all.

Only when I push to GitHub and it gets deployed to Netlify, I’m getting weird errors that should not occur.
Can anyone help me with this? I’m new to Netlify and this is already a major turn-off for me…

Thanks in advance.

1:47:28 PM: Build ready to start
1:47:30 PM: build-image version: 9e0f207a27642d0115b1ca97cd5e8cebbe492f63
1:47:30 PM: build-image tag: v3.3.2
1:47:30 PM: buildbot version: ef8d0929ed0baabafd8bbb7d0b021e1fc24180c0
1:47:30 PM: Fetching cached dependencies
1:47:30 PM: Starting to download cache of 255.0KB
1:47:30 PM: Finished downloading cache in 99.14926ms
1:47:30 PM: Starting to extract cache
1:47:30 PM: Failed to fetch cache, continuing with build
1:47:30 PM: Starting to prepare the repo for build
1:47:31 PM: No cached dependencies found. Cloning fresh repo
1:47:31 PM: git clone https://github.com/JeroenGoddijn/my-portfolio-site
1:47:32 PM: Preparing Git Reference refs/heads/master
1:47:33 PM: Starting build script
1:47:33 PM: Installing dependencies
1:47:34 PM: Downloading and installing node v10.16.3...
1:47:35 PM: Downloading https://nodejs.org/dist/v10.16.3/node-v10.16.3-linux-x64.tar.xz...
1:47:35 PM: 
#########################
1:47:35 PM:                  35.1%
1:47:35 PM: 
##################################
1:47:35 PM: ############                            64.1%
1:47:35 PM: 
##############################
1:47:35 PM: ####################################        92.9%
1:47:35 PM: 
########################################
1:47:35 PM: ################################ 100.0%
1:47:35 PM: Computing checksum with sha256sum
1:47:35 PM: Checksums matched!
1:47:38 PM: Now using node v10.16.3 (npm v6.9.0)
1:47:39 PM: Attempting ruby version 2.6.2, read from environment
1:47:40 PM: Using ruby version 2.6.2
1:47:40 PM: Using PHP version 5.6
1:47:40 PM: Started restoring cached node modules
1:47:40 PM: Finished restoring cached node modules
1:47:41 PM: Installing NPM modules using NPM version 6.9.0
1:47:43 PM: npm
1:47:43 PM:  WARN deprecated @babel/polyfill@7.4.4: 🚨 As of Babel 7.4.0, this
1:47:43 PM: npm
1:47:43 PM:  WARN deprecated package has been deprecated in favor of directly
1:47:43 PM: npm
1:47:43 PM: WARN deprecated including core-js/stable (to polyfill ECMAScript
1:47:43 PM: npm
1:47:43 PM: WARN deprecated
1:47:43 PM:  features) and regenerator-runtime/runtime
1:47:43 PM: npm
1:47:43 PM:  WARN deprecated (needed to use transpiled generator functions):
1:47:43 PM: npm
1:47:43 PM: WARN deprecated
1:47:43 PM: npm
1:47:43 PM:  WARN
1:47:43 PM:  deprecated   > import "core-js/stable";
1:47:43 PM: npm WARN
1:47:43 PM:  deprecated
1:47:43 PM:    > import "regenerator-runtime/runtime";
1:47:46 PM: npm WARN deprecated
1:47:46 PM:  joi@11.4.0: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
1:47:49 PM: npm WARN deprecated hoek@4.2.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
1:47:49 PM: npm WARN deprecated
1:47:49 PM:  topo@2.0.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
1:47:55 PM: npm WARN deprecated core-js@1.2.7: core-js@<2.6.8 is no longer maintained. Please, upgrade to core-js@3 or at least to actual version of core-js@2.
1:48:40 PM: > sharp@0.23.0 install /opt/build/repo/node_modules/sharp
1:48:40 PM: > (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
1:48:40 PM: info
1:48:40 PM: sharp
1:48:40 PM:  Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.8.1/libvips-8.8.1-linux-x64.tar.gz
1:48:43 PM: > node-sass@4.12.0 install /opt/build/repo/node_modules/node-sass
1:48:43 PM: > node scripts/install.js
1:48:43 PM: Downloading binary from https://github.com/sass/node-sass/releases/download/v4.12.0/linux-x64-64_binding.node
1:48:44 PM: Download complete
1:48:44 PM: Binary saved to /opt/build/repo/node_modules/node-sass/vendor/linux-x64-64/binding.node
1:48:44 PM: Caching binary to /opt/buildhome/.npm/node-sass/4.12.0/linux-x64-64_binding.node
1:48:45 PM: > core-js@2.6.9 postinstall /opt/build/repo/node_modules/core-js
1:48:45 PM: > node scripts/postinstall || echo "ignore"
1:48:45 PM: Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
1:48:45 PM: The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: 
1:48:45 PM: > https://opencollective.com/core-js 
1:48:45 PM: > https://www.patreon.com/zloirock 
1:48:45 PM: Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
1:48:45 PM: > gatsby-telemetry@1.1.19 postinstall /opt/build/repo/node_modules/gatsby-telemetry
1:48:45 PM: > node src/postinstall.js
1:48:45 PM: > gatsby@2.14.0 postinstall /opt/build/repo/node_modules/gatsby
1:48:45 PM: > node scripts/postinstall.js
1:48:46 PM: > node-sass@4.12.0 postinstall /opt/build/repo/node_modules/node-sass
1:48:46 PM: > node scripts/build.js
1:48:46 PM: Binary found at /opt/build/repo/node_modules/node-sass/vendor/linux-x64-64/binding.node
1:48:46 PM: Testing binary
1:48:46 PM: Binary is fine
1:48:48 PM: npm
1:48:48 PM: notice created a lockfile as package-lock.json. You should commit this file.
1:48:48 PM: npm WARN
1:48:48 PM: optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/fsevents):
1:48:48 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
1:48:48 PM: npm
1:48:48 PM: WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.0.7 (node_modules/chokidar/node_modules/fsevents):
1:48:48 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.0.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
1:48:48 PM: added 1905 packages from 1025 contributors and audited 23733 packages in 66.885s
1:48:48 PM: found 0 vulnerabilities
1:48:49 PM: NPM modules installed
1:48:49 PM: Started restoring cached go cache
1:48:49 PM: Finished restoring cached go cache
1:48:49 PM: unset GOOS;
1:48:49 PM: unset GOARCH;
1:48:49 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.12.linux.amd64';
1:48:49 PM: export PATH="/opt/buildhome/.gimme/versions/go1.12.linux.amd64/bin:${PATH}";
1:48:49 PM: go version >&2;
1:48:49 PM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.12.linux.amd64.env';
1:48:49 PM: go version go1.12 linux/amd64
1:48:49 PM: Installing missing commands
1:48:49 PM: Verify run directory
1:48:49 PM: Executing user command: gatsby build
1:48:52 PM: success open and validate gatsby-configs — 0.091
1:48:53 PM: success load plugins — 0.824
1:48:53 PM: success onPreInit — 0.017
1:48:53 PM: success delete html and css files from previous builds — 0.029
1:48:53 PM: success initialize cache — 0.025
1:48:53 PM: success copy gatsby files — 0.057
1:48:53 PM: success onPreBootstrap — 0.028
1:48:53 PM: success source and transform nodes — 0.226
1:48:54 PM: success Add explicit types — 0.032
1:48:54 PM: success Add inferred types — 0.197
1:48:54 PM: success Processing types — 0.113
1:48:54 PM: success building schema — 0.497
1:48:54 PM: success createPages — 0.039
1:48:54 PM: success createPagesStatefully — 0.059
1:48:54 PM: success onPreExtractQueries — 0.015
1:48:54 PM: success update schema — 0.063
1:48:54 PM: success extract queries from components — 0.228
1:48:54 PM: success write out requires — 0.020
1:48:54 PM: success write out redirect data — 0.015
1:48:55 PM: success Build manifest and related icons — 0.470
1:48:55 PM: success onPostBootstrap — 0.492
1:48:55 PM: info bootstrap finished - 5.860 s
1:48:55 PM: success run static queries — 0.018
1:49:21 PM: success Building production JavaScript and CSS bundles — 26.520
1:49:22 PM: success Rewriting compilation hashes — 0.077
1:49:22 PM: success run page queries — 0.175 — 4/4 28.79 queries/second
1:49:25 PM: error #95313  Minified React error #130; visit https://reactjs.org/docs/error-decoder.html?invariant=130&args[]=undefined&args[]= for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
1:49:25 PM: Building static HTML failed for path "/404/"
1:49:25 PM: See our docs page for more info on this error: https://gatsby.dev/debug-html
1:49:25 PM: 
1:49:25 PM:   Error: Minified React error #130; visit https://reactjs.org/docs/error-decoder  .html?invariant=130&args[]=undefined&args[]= for the full message or use the n  on-minified dev environment for full errors and additional helpful warnings.
1:49:25 PM:   
1:49:25 PM:   - react-dom-server.node.production.min.js:47 a.render
1:49:25 PM:     [repo]/[react-dom]/cjs/react-dom-server.node.production.min.js:47:349
1:49:25 PM:   
1:49:25 PM:   - react-dom-server.node.production.min.js:44 a.read
1:49:25 PM:     [repo]/[react-dom]/cjs/react-dom-server.node.production.min.js:44:161
1:49:25 PM:   
1:49:25 PM:   - react-dom-server.node.production.min.js:55 renderToString
1:49:25 PM:     [repo]/[react-dom]/cjs/react-dom-server.node.production.min.js:55:83
1:49:25 PM:   
1:49:25 PM:   - render-page.js:563 Module../.cache/static-entry.js.__webpack_exports__.defau    lt
1:49:25 PM:     /opt/build/repo/public/render-page.js:563:28
1:49:25 PM:   
1:49:25 PM:   - render-html.js:35 Promise
1:49:25 PM:     [repo]/[gatsby]/dist/utils/worker/render-html.js:35:36
1:49:25 PM:   
1:49:25 PM:   - debuggability.js:313 Promise._execute
1:49:25 PM:     [repo]/[bluebird]/js/release/debuggability.js:313:9
1:49:25 PM:   
1:49:25 PM:   - promise.js:488 Promise._resolveFromExecutor
1:49:25 PM:     [repo]/[bluebird]/js/release/promise.js:488:18
1:49:25 PM:   
1:49:25 PM:   - promise.js:79 new Promise
1:49:25 PM:     [repo]/[bluebird]/js/release/promise.js:79:10
1:49:25 PM:   
1:49:25 PM:   - render-html.js:31 Promise.map.path
1:49:25 PM:     [repo]/[gatsby]/dist/utils/worker/render-html.js:31:37
1:49:25 PM:   
1:49:25 PM:   - util.js:16 tryCatcher
1:49:25 PM:     [repo]/[bluebird]/js/release/util.js:16:23
1:49:25 PM:   
1:49:25 PM:   - map.js:61 MappingPromiseArray._promiseFulfilled
1:49:25 PM:     [repo]/[bluebird]/js/release/map.js:61:38
1:49:25 PM:   
1:49:25 PM:   - promise_array.js:114 MappingPromiseArray.PromiseArray._iterate
1:49:25 PM:     [repo]/[bluebird]/js/release/promise_array.js:114:31
1:49:25 PM:   
1:49:25 PM:   - promise_array.js:78 MappingPromiseArray.init
1:49:25 PM:     [repo]/[bluebird]/js/release/promise_array.js:78:10
1:49:25 PM:   
1:49:25 PM:   - map.js:30 MappingPromiseArray._asyncInit
1:49:25 PM:     [repo]/[bluebird]/js/release/map.js:30:10
1:49:25 PM:   
1:49:25 PM:   - async.js:142 _drainQueueStep
1:49:25 PM:     [repo]/[bluebird]/js/release/async.js:142:12
1:49:25 PM:   
1:49:25 PM:   - async.js:131 _drainQueue
1:49:25 PM:     [repo]/[bluebird]/js/release/async.js:131:9
1:49:25 PM:   
1:49:25 PM: 
1:49:25 PM: Skipping functions preparation step: no functions directory set
1:49:25 PM: Caching artifacts
1:49:25 PM: Started saving node modules
1:49:25 PM: Finished saving node modules
1:49:25 PM: Started saving pip cache
1:49:25 PM: Finished saving pip cache
1:49:25 PM: Started saving emacs cask dependencies
1:49:25 PM: Finished saving emacs cask dependencies
1:49:25 PM: Started saving maven dependencies
1:49:25 PM: Finished saving maven dependencies
1:49:25 PM: Started saving boot dependencies
1:49:25 PM: Finished saving boot dependencies
1:49:25 PM: Started saving go dependencies
1:49:25 PM: Finished saving go dependencies
1:49:27 PM: Error running command: Build script returned non-zero exit code: 1
1:49:27 PM: Failing build: Failed to build site
1:49:27 PM: failed during stage 'building site': Build script returned non-zero exit code: 1
1:49:28 PM: Finished processing build request in 1m57.510240473s

Hi Jeroen,

Your best bet for debugging will be to follow the steps here:

While you do so, you’ll see that a good starting spot for “works locally” is to make sure that we use the same versions of build tools as you (cf https://www.netlify.com/docs/build-settings/ linked from that article).

Am a bit surprised you have a package.json and not a yarn.lock for a gatsby project - seems like most of them I see use yarn instead of npm. That’s not necessarily wrong, you’re just in the minority and that article I linked talks about how to make sure we’re using the same tool as well as version as you.

Let us know how your debugging goes!