Hi folks,
I’ve started running into problems getting my Gatsby site to build on Netlify. It builds locally (I’ve also checked with a fresh clone from the repo).
I’ve tried clearing the cache and redeploying, upgrading and downgrading dependencies, looking for uppercase/lowercase inconsistencies.
The issue resolving ‘react-is’ occurs with both styled-components 5.2.1 and 5.1.1 (which the last successful build used).
I’d be very grateful for any assistance or suggestions.
Please let me know if you need any more info.
Netlify Site Name: adoring-hoover-f3a2f6
Custom Domain: https://gerardhynes.com
Repo: https://github.com/GK-Hynes/personal-site
Gatsby Info:
System:
OS: Linux 4.4 Ubuntu 20.04.1 LTS (Focal Fossa)
CPU: (4) x64 Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz
Shell: 5.0.17 - /bin/bash
Binaries:
Node: 14.15.0 - /usr/local/bin/node
Yarn: 1.22.5 - /usr/local/bin/yarn
npm: 7.5.6 - /usr/local/bin/npm
Languages:
Python: 2.7.18 - /usr/bin/python
npmPackages:
gatsby: ^2.32.8 => 2.32.8
gatsby-image: ^2.11.0 => 2.11.0
gatsby-plugin-manifest: ^2.12.1 => 2.12.1
gatsby-plugin-mdx: ^1.10.1 => 1.10.1
gatsby-plugin-offline: ^3.10.2 => 3.10.2
gatsby-plugin-react-helmet: ^3.10.0 => 3.10.0
gatsby-plugin-sharp: ^2.14.3 => 2.14.3
gatsby-plugin-styled-components: ^3.10.0 => 3.10.0
gatsby-remark-images: ^3.11.1 => 3.11.1
gatsby-source-filesystem: ^2.11.1 => 2.11.1
gatsby-transformer-sharp: ^2.12.0 => 2.12.0
npmGlobalPackages:
gatsby-cli: 2.19.2
package.json:
{
"name": "gerard-hynes-site",
"description": "Gerard's personal site",
"version": "1.0.0",
"author": "Gerard Hynes <gkhynes@gmail.com>",
"dependencies": {
"@fontsource/inter": "^4.2.1",
"@mdx-js/mdx": "^1.6.22",
"@mdx-js/react": "^1.6.22",
"babel-plugin-styled-components": "^1.12.0",
"gatsby": "^2.32.8",
"gatsby-image": "^2.11.0",
"gatsby-plugin-manifest": "^2.12.1",
"gatsby-plugin-mdx": "^1.10.1",
"gatsby-plugin-offline": "^3.10.2",
"gatsby-plugin-react-helmet": "^3.10.0",
"gatsby-plugin-sharp": "^2.14.3",
"gatsby-plugin-styled-components": "^3.10.0",
"gatsby-remark-images": "^3.11.1",
"gatsby-source-filesystem": "^2.11.1",
"gatsby-transformer-sharp": "^2.12.0",
"prop-types": "^15.7.2",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-helmet": "^6.1.0",
"styled-components": "^5.2.1",
"styled-icons": "^10.28.0"
},
"devDependencies": {
"prettier": "2.2.1"
},
"keywords": [
"gatsby"
],
"license": "0BSD",
"scripts": {
"build": "gatsby build",
"develop": "gatsby develop",
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"",
"start": "npm run develop",
"serve": "gatsby serve",
"clean": "gatsby clean",
"test": "echo \"Write tests! -> https://gatsby.dev/unit-testing\" && exit 1"
}
}
Build settings:
Latest Failing Build Log:
12:32:56 PM: Build ready to start
12:32:57 PM: build-image version: d84c79427e8f83c1ba17bcdd7b3fe38059376b68
12:32:57 PM: build-image tag: v3.6.1
12:32:57 PM: buildbot version: 4c3d8713ccd4c98ab9180f79a013d42d2076d9ff
12:32:57 PM: Fetching cached dependencies
12:32:58 PM: Starting to download cache of 187.2MB
12:32:59 PM: Finished downloading cache in 1.982507739s
12:32:59 PM: Starting to extract cache
12:33:10 PM: Finished extracting cache in 10.431182901s
12:33:10 PM: Finished fetching cache in 12.477635236s
12:33:10 PM: Starting to prepare the repo for build
12:33:10 PM: Preparing Git Reference refs/heads/main
12:33:13 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: 'public' versus 'public/' in the Netlify UI
12:33:13 PM: Starting build script
12:33:13 PM: Installing dependencies
12:33:13 PM: Python version set to 2.7
12:33:13 PM: Started restoring cached node version
12:33:16 PM: Finished restoring cached node version
12:33:16 PM: v12.18.0 is already installed.
12:33:17 PM: Now using node v12.18.0 (npm v6.14.4)
12:33:17 PM: Started restoring cached build plugins
12:33:17 PM: Finished restoring cached build plugins
12:33:17 PM: Attempting ruby version 2.7.1, read from environment
12:33:18 PM: Using ruby version 2.7.1
12:33:19 PM: Using PHP version 5.6
12:33:19 PM: Started restoring cached node modules
12:33:19 PM: Finished restoring cached node modules
12:33:19 PM: Installing NPM modules using NPM version 6.14.4
12:34:17 PM: npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it!
12:34:17 PM: > sharp@0.27.2 install /opt/build/repo/node_modules/sharp
12:34:17 PM: > (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
12:34:18 PM: info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.10.5/libvips-8.10.5-linux-x64.tar.br
12:34:20 PM: > core-js@2.6.12 postinstall /opt/build/repo/node_modules/babel-runtime/node_modules/core-js
12:34:20 PM: > node -e "try{require('./postinstall')}catch(e){}"
12:34:20 PM: > core-js@3.9.0 postinstall /opt/build/repo/node_modules/core-js
12:34:20 PM: > node -e "try{require('./postinstall')}catch(e){}"
12:34:20 PM: > core-js-pure@3.9.0 postinstall /opt/build/repo/node_modules/core-js-pure
12:34:20 PM: > node -e "try{require('./postinstall')}catch(e){}"
12:34:21 PM: > mozjpeg@7.0.0 postinstall /opt/build/repo/node_modules/mozjpeg
12:34:21 PM: > node lib/install.js
12:34:21 PM: ✔ mozjpeg pre-build test passed successfully
12:34:21 PM: > pngquant-bin@6.0.0 postinstall /opt/build/repo/node_modules/pngquant-bin
12:34:21 PM: > node lib/install.js
12:34:21 PM: ✔ pngquant pre-build test passed successfully
12:34:22 PM: > gatsby-telemetry@1.10.1 postinstall /opt/build/repo/node_modules/gatsby-telemetry
12:34:22 PM: > node src/postinstall.js || true
12:34:22 PM: > gatsby-cli@2.19.2 postinstall /opt/build/repo/node_modules/gatsby-cli
12:34:22 PM: > node scripts/postinstall.js
12:34:22 PM: > gatsby@2.32.8 postinstall /opt/build/repo/node_modules/gatsby
12:34:22 PM: > node scripts/postinstall.js
12:34:24 PM: npm WARN @reach/router@1.3.4 requires a peer of react@15.x || 16.x || 16.4.0-alpha.0911da3 but none is installed. You must install peer dependencies yourself.
12:34:24 PM: npm WARN @reach/router@1.3.4 requires a peer of react-dom@15.x || 16.x || 16.4.0-alpha.0911da3 but none is installed. You must install peer dependencies yourself.
12:34:24 PM: npm WARN create-react-context@0.3.0 requires a peer of react@^0.14.0 || ^15.0.0 || ^16.0.0 but none is installed. You must install peer dependencies yourself.
12:34:24 PM: npm WARN gerard-hynes-site@1.0.0 No repository field.
12:34:24 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/webpack-dev-server/node_modules/fsevents):
12:34:24 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
12:34:24 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/watchpack-chokidar2/node_modules/fsevents):
12:34:24 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
12:34:24 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents):
12:34:24 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
12:34:24 PM: added 484 packages from 170 contributors, removed 578 packages, updated 483 packages and audited 2517 packages in 64.807s
12:34:26 PM: 253 packages are looking for funding
12:34:26 PM: run `npm fund` for details
12:34:26 PM: found 0 vulnerabilities
12:34:26 PM: NPM modules installed
12:34:27 PM: Started restoring cached go cache
12:34:27 PM: Finished restoring cached go cache
12:34:27 PM: go version go1.14.4 linux/amd64
12:34:27 PM: go version go1.14.4 linux/amd64
12:34:27 PM: Installing missing commands
12:34:27 PM: Verify run directory
12:34:28 PM:
12:34:28 PM: ────────────────────────────────────────────────────────────────
12:34:28 PM: Netlify Build
12:34:28 PM: ────────────────────────────────────────────────────────────────
12:34:28 PM:
12:34:28 PM: ❯ Version
12:34:28 PM: @netlify/build 9.4.0
12:34:28 PM:
12:34:28 PM: ❯ Flags
12:34:28 PM: deployId: 603a3bf86567510007afe52e
12:34:28 PM: mode: buildbot
12:34:28 PM:
12:34:28 PM: ❯ Current directory
12:34:28 PM: /opt/build/repo
12:34:28 PM:
12:34:28 PM: ❯ Config file
12:34:28 PM: No config file was defined: using default values.
12:34:28 PM:
12:34:28 PM: ❯ Context
12:34:28 PM: production
12:34:28 PM:
12:34:28 PM: ────────────────────────────────────────────────────────────────
12:34:28 PM: 1. Build command from Netlify app
12:34:28 PM: ────────────────────────────────────────────────────────────────
12:34:28 PM:
12:34:28 PM: $ gatsby build
12:34:31 PM: success open and validate gatsby-configs - 0.049s
12:34:32 PM: success load plugins - 1.010s
12:34:32 PM: success onPreInit - 0.129s
12:34:32 PM: success delete html and css files from previous builds - 0.003s
12:34:33 PM: success initialize cache - 0.006s
12:34:33 PM: success copy gatsby files - 0.034s
12:34:33 PM: success onPreBootstrap - 0.015s
12:34:33 PM: success createSchemaCustomization - 0.005s
12:34:35 PM: success Checking for changed pages - 0.000s
12:34:35 PM: success source and transform nodes - 2.024s
12:34:35 PM: success building schema - 0.627s
12:34:37 PM: info Total nodes: 76, SitePage nodes: 4 (use --verbose for breakdown)
12:34:37 PM: success createPages - 1.512s
12:34:37 PM: success Checking for changed pages - 0.000s
12:34:37 PM: success createPagesStatefully - 0.196s
12:34:37 PM: success update schema - 0.135s
12:34:37 PM: success onPreExtractQueries - 0.000s
12:34:38 PM: success extract queries from components - 1.064s
12:34:38 PM: success write out redirect data - 0.001s
12:34:38 PM: success Build manifest and related icons - 0.219s
12:34:38 PM: success onPostBootstrap - 0.222s
12:34:38 PM: info bootstrap finished - 10.014s
12:34:39 PM: success run static queries - 0.788s - 5/5 6.34/s
12:34:44 PM: success run page queries - 5.209s - 9/9 1.73/s
12:34:45 PM: success write out requires - 0.071s
12:35:03 PM: failed Building production JavaScript and CSS bundles - 18.784s
12:35:03 PM: error Generating JavaScript bundles failed
12:35:03 PM: Can't resolve 'react-is' in '/opt/build/repo/node_modules/styled-components/dist'
12:35:03 PM: If you're trying to use a package make sure that 'react-is' is installed. If you're trying to use a local file make sure that the path is correct.
12:35:03 PM: not finished Generating image thumbnails - 30.334s
12:35:03 PM:
12:35:03 PM: ────────────────────────────────────────────────────────────────
12:35:03 PM: "build.command" failed
12:35:03 PM: ────────────────────────────────────────────────────────────────
12:35:03 PM:
12:35:03 PM: Error message
12:35:03 PM: Command failed with exit code 1: gatsby build
12:35:03 PM:
12:35:03 PM: Error location
12:35:03 PM: In Build command from Netlify app:
12:35:03 PM: gatsby build
12:35:03 PM:
12:35:03 PM: Resolved config
12:35:03 PM: build:
12:35:03 PM: command: gatsby build
12:35:03 PM: commandOrigin: ui
12:35:03 PM: publish: /opt/build/repo/public
12:35:04 PM: Caching artifacts
12:35:04 PM: Started saving node modules
12:35:04 PM: Finished saving node modules
12:35:04 PM: Started saving build plugins
12:35:04 PM: Finished saving build plugins
12:35:04 PM: Started saving pip cache
12:35:04 PM: Finished saving pip cache
12:35:04 PM: Started saving emacs cask dependencies
12:35:04 PM: Finished saving emacs cask dependencies
12:35:04 PM: Started saving maven dependencies
12:35:04 PM: Finished saving maven dependencies
12:35:04 PM: Started saving boot dependencies
12:35:04 PM: Finished saving boot dependencies
12:35:04 PM: Started saving rust rustup cache
12:35:04 PM: Finished saving rust rustup cache
12:35:04 PM: Started saving go dependencies
12:35:04 PM: Finished saving go dependencies
12:35:04 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
12:35:04 PM: Failing build: Failed to build site
12:35:04 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2
12:35:04 PM: Finished processing build request in 2m6.588900112s