gatsbyjs / gatsby

The best React-based framework with performance, scalability and security built in.
https://www.gatsbyjs.com
MIT License
55.27k stars 10.32k forks source link

Build fails on Netlify but runs successfully locally #19103

Closed raquelmsmith closed 4 years ago

raquelmsmith commented 4 years ago

Summary

I am attempting to deploy my site via Netlify. I have done this a number of times before, but after leaving the project to sit for a while the build now fails. It will build successfully locally, but on Netlify it fails. I think it has something to do with dependencies but I can't figure out what the problem is.

Relevant information

Here is the Netlify build log:

8:01:04 PM: Build ready to start
8:01:46 PM: build-image version: 9e0f207a27642d0115b1ca97cd5e8cebbe492f63
8:01:46 PM: build-image tag: v3.3.2
8:01:46 PM: buildbot version: a2bab682ae0761baa4d123ebd00c57be933655dc
8:01:47 PM: Fetching cached dependencies
8:01:47 PM: Starting to download cache of 255.0KB
8:01:47 PM: Finished downloading cache in 101.889842ms
8:01:47 PM: Starting to extract cache
8:01:47 PM: Failed to fetch cache, continuing with build
8:01:47 PM: Starting to prepare the repo for build
8:01:47 PM: No cached dependencies found. Cloning fresh repo
8:01:47 PM: git clone https://github.com/raquelmsmith/rms-portfolio
8:01:48 PM: Preparing Git Reference refs/heads/master
8:01:49 PM: Starting build script
8:01:49 PM: Installing dependencies
8:01:50 PM: Attempting node version '10.13.0' from .nvmrc
8:01:51 PM: Downloading and installing node v10.13.0...
8:01:52 PM: Downloading https://nodejs.org/dist/v10.13.0/node-v10.13.0-linux-x64.tar.xz...
8:01:52 PM:   1.3%
8:01:52 PM: 
###
8:01:52 PM:                                                       4.8%
8:01:52 PM: 
######                                                                     9.1%
8:01:52 PM: 
###########
8:01:52 PM:                           15.6%
8:01:52 PM: 
####################                                                      28.5%
8:01:53 PM: 
######################################
8:01:53 PM:  53.0%
8:01:53 PM: 
######################################################
8:01:53 PM: #####               83.0%
8:01:53 PM: 
######################################################################
8:01:53 PM: ## 100.0%
8:01:53 PM: Computing checksum with sha256sum
8:01:53 PM: Checksums matched!
8:01:56 PM: Now using node v10.13.0 (npm v6.4.1)
8:01:56 PM: Attempting ruby version 2.6.2, read from environment
8:01:58 PM: Using ruby version 2.6.2
8:01:59 PM: Using PHP version 5.6
8:01:59 PM: Started restoring cached node modules
8:01:59 PM: Finished restoring cached node modules
8:01:59 PM: Started restoring cached yarn cache
8:01:59 PM: Finished restoring cached yarn cache
8:01:59 PM: Installing yarn at version 1.13.0
8:01:59 PM: Installing Yarn!
8:01:59 PM: > Downloading tarball...
8:01:59 PM: [1/2]: https://yarnpkg.com/downloads/1.13.0/yarn-v1.13.0.tar.gz
8:01:59 PM:  --> /tmp/yarn.tar.gz.Tl9HBCZfc1
8:01:59 PM:   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
8:01:59 PM:                                  Dload  Upload   Total   Spent    Left  Speed
8:01:59 PM: 
  0     0    0     0    0     0
8:01:59 PM:     0      0 --:--:-- --:--:-- --:--:--     0
8:01:59 PM: 
100    93  100    93    0     0    300      0 --:--:-- --:--:-- --:--:--   300
8:01:59 PM: 
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:
8:01:59 PM: --:--     0
8:01:59 PM: 
100   609    0   609    0     0    840      0 --:--:-- --:--:-- --:--:--  4445
8:02:00 PM: 
100 1142k  100 1142k    0     0   876k      0  0:0
8:02:00 PM: 0:01  0:00:01 --:--:--  876k
8:02:00 PM: [2/2]: https://yarnpkg.com/downloads/1.13.0/yarn-v1.13.0.tar.gz.asc -->
8:02:00 PM: /tmp/yarn.tar.gz.Tl9HBCZfc1.asc
8:02:00 PM: 
100    97  100    97    0     0   2439      0 --:--:-- --:--:-- --:--:--  2
8:02:00 PM: 439
8:02:00 PM: 
100   613    0   613    0     0   3376      0 --:--:-- --:--:-- --:-
8:02:00 PM: -:--  3376
8:02:00 PM: 
100   832  100   832    0     0   3744      0 --:--:-- --
8:02:00 PM: :--:-- --:--:--  3744
8:02:00 PM: > Verifying integrity...
8:02:00 PM: gpg: Signature made Tue 18 Dec 2018 04:04:55 PM UTC using RSA key ID B6FF4DE3
8:02:00 PM: gpg: Good signature from "Yarn Packaging <yarn@dan.cx>"
8:02:00 PM: gpg: Note: This key has expired!
8:02:00 PM: Primary key fingerprint: 72EC F46A 56B4 AD39 C907
8:02:00 PM:   BBB7 1646 B01B 86E5 0310
8:02:00 PM:      Subkey fingerprint: E219 30C4 D0A4 AA46 1858  1F7A E074 D16E B6FF 4DE3
8:02:00 PM: > GPG signature looks good
8:02:00 PM: > Extracting to ~/.yarn...
8:02:00 PM: > Adding to $PATH...
8:02:00 PM: > We've added the following to your /opt/buildhome/.profile
8:02:00 PM: > If this isn't the profile of your current shell then please add the following to your correct profile:
8:02:00 PM: export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
8:02:00 PM: 
8:02:01 PM: > Successfully installed Yarn 1.13.0! Please open another terminal where the `yarn` command will now be available.
8:02:02 PM: Installing NPM modules using Yarn version 1.13.0
8:02:02 PM: yarn install v1.13.0
8:02:03 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.
8:02:03 PM: [1/4] Resolving packages...
8:02:15 PM: [2/4] Fetching packages...
8:02:49 PM: info fsevents@1.2.7: The platform "linux" is incompatible with this module.
8:02:49 PM: info "fsevents@1.2.7" is an optional dependency and failed compatibility check. Excluding it from installation.
8:02:49 PM: info idb-connector@1.1.8: The platform "linux" is incompatible with this module.
8:02:49 PM: info "idb-connector@1.1.8" is an optional dependency and failed compatibility check. Excluding it from installation.
8:02:49 PM: info fsevents@2.1.1: The platform "linux" is incompatible with this module.
8:02:49 PM: info "fsevents@2.1.1" is an optional dependency and failed compatibility check. Excluding it from installation.
8:02:49 PM: [3/4] Linking dependencies...
8:02:49 PM: warning "gatsby > eslint-plugin-graphql@2.1.1" has incorrect peer dependency "graphql@^0.12.0 || ^0.13.0".
8:02:49 PM: warning "gatsby > express-graphql@0.6.12" has incorrect peer dependency "graphql@^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0".
8:02:49 PM: warning "gatsby > graphql-tools@3.1.1" has incorrect peer dependency "graphql@^0.13.0".
8:02:49 PM: warning "gatsby-plugin-emotion > @emotion/babel-preset-css-prop > @babel/plugin-transform-react-jsx@7.3.0" has unmet peer dependency "@babel/core@^7.0.0-0".
8:02:49 PM: warning "gatsby-plugin-emotion > @emotion/babel-preset-css-prop@10.0.22" has unmet peer dependency "@babel/core@^7.0.0".
8:02:49 PM: warning "gatsby-plugin-emotion > @emotion/babel-preset-css-prop > @emotion/babel-plugin-jsx-pragmatic@0.1.3" has unmet peer dependency "@babel/core@^7.0.0".
8:02:49 PM: warning " > gatsby-plugin-feed@2.3.19" has incorrect peer dependency "gatsby@^2.4.0".
8:02:49 PM: warning " > gatsby-plugin-manifest@2.2.25" has incorrect peer dependency "gatsby@^2.4.0".
8:02:49 PM: warning "gatsby-plugin-remote-images > gatsby-source-filesystem@2.1.35" has incorrect peer dependency "gatsby@^2.2.0".
8:03:04 PM: [4/4] Building fresh packages...
8:03:10 PM: success Saved lockfile.
8:03:10 PM: Done in 67.47s.
8:03:10 PM: NPM modules installed using Yarn
8:03:10 PM: Started restoring cached go cache
8:03:10 PM: Finished restoring cached go cache
8:03:11 PM: unset GOOS;
8:03:11 PM: unset GOARCH;
8:03:11 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.12.linux.amd64';
8:03:11 PM: export PATH="/opt/buildhome/.gimme/versions/go1.12.linux.amd64/bin:${PATH}";
8:03:11 PM: go version >&2;
8:03:11 PM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.12.linux.amd64.env';
8:03:11 PM: go version go1.12 linux/amd64
8:03:11 PM: Installing missing commands
8:03:11 PM: Verify run directory
8:03:11 PM: Executing user command: npm run build
8:03:11 PM: > raquel-m-smith-website@0.1.0 build /opt/build/repo
8:03:11 PM: > gatsby build
8:03:14 PM: success open and validate gatsby-configs — 0.018 s
8:03:14 PM: warning Plugin gatsby-plugin-feed is not compatible with your gatsby version 2.1.17 - It requires gatsby@^2.4.0
8:03:15 PM: warning Plugin gatsby-plugin-manifest is not compatible with your gatsby version 2.1.17 - It requires gatsby@^2.4.0
8:03:15 PM: success load plugins — 0.651 s
8:03:17 PM: success onPreInit — 1.496 s
8:03:17 PM: success delete html and css files from previous builds — 0.011 s
8:03:17 PM: success initialize cache — 0.090 s
8:03:17 PM: success copy gatsby files — 0.068 s
8:03:17 PM: success onPreBootstrap — 0.017 s
8:03:19 PM:  -> wordpress__POST fetched : 7
8:03:20 PM:  -> wordpress__wp_media fetched : 36
8:03:21 PM:  -> wordpress__wp_projects fetched : 3
8:03:21 PM:  -> wordpress__wp_taxonomies fetched : 1
8:03:22 PM:  -> wordpress__CATEGORY fetched : 14
8:03:23 PM:  -> wordpress__TAG fetched : 10
8:03:24 PM:  -> wordpress__wp_comments fetched : 21
8:03:27 PM: success source and transform nodes — 10.151 s
8:03:28 PM: success building schema — 1.187 s
8:03:28 PM: success createPages — 0.178 s
8:03:28 PM: success createPagesStatefully — 0.058 s
8:03:28 PM: success onPreExtractQueries — 0.006 s
8:03:29 PM: success update schema — 0.752 s
8:03:29 PM: warning There are conflicting field types in your data. GraphQL schema will omit those fields.
8:03:29 PM: wordpress__wp_media.media_details.image_meta.aperture:
8:03:29 PM:  - type: number
8:03:29 PM:    value: 0
8:03:29 PM:  - type: string
8:03:29 PM:    value: '0'
8:03:29 PM: wordpress__wp_media.media_details.image_meta.created_timestamp:
8:03:29 PM:  - type: number
8:03:29 PM:    value: 0
8:03:29 PM:  - type: string
8:03:29 PM:    value: '0'
8:03:29 PM: wordpress__wp_media.media_details.image_meta.focal_length:
8:03:29 PM:  - type: number
8:03:29 PM:    value: 0
8:03:29 PM:  - type: string
8:03:29 PM:    value: '0'
8:03:29 PM: wordpress__wp_media.media_details.image_meta.iso:
8:03:29 PM:  - type: number
8:03:29 PM:    value: 0
8:03:29 PM:  - type: string
8:03:29 PM:    value: '0'
8:03:29 PM: wordpress__wp_media.media_details.image_meta.shutter_speed:
8:03:29 PM:  - type: number
8:03:29 PM:    value: 0
8:03:29 PM:  - type: string
8:03:29 PM:    value: '0'
8:03:29 PM: wordpress__wp_media.media_details.image_meta.orientation:
8:03:29 PM:  - type: number
8:03:29 PM:    value: 0
8:03:29 PM:  - type: string
8:03:29 PM:    value: '0'
8:03:29 PM: success extract queries from components — 0.358 s
8:03:37 PM: success run graphql queries — 7.740 s — 20/20 2.58 queries/second
8:03:37 PM: success write out page data — 0.009 s
8:03:37 PM: success write out redirect data — 0.001 s
8:04:42 PM: info bootstrap finished - 90.838 s
8:04:42 PM: node: symbol lookup error: /opt/build/repo/node_modules/gatsby-plugin-manifest/node_modules/sharp/build/Release/sharp.node: undefined symbol: _ZNK4vips6VImage13icc_transformEPKcPNS_7VOptionE
8:04:42 PM: npm
8:04:42 PM:  ERR! file sh
8:04:42 PM: npm
8:04:42 PM:  ERR!
8:04:42 PM: code
8:04:42 PM:  ELIFECYCLE
8:04:42 PM: npm ERR!
8:04:42 PM:  errno
8:04:42 PM:  ENOENT
8:04:42 PM: npm
8:04:42 PM:  ERR!
8:04:42 PM:  syscall
8:04:42 PM:  spawn
8:04:42 PM: npm
8:04:42 PM: ERR!
8:04:42 PM:  raquel-m-smith-website@0.1.0 build: `gatsby build`
8:04:42 PM: npm ERR! spawn ENOENT
8:04:42 PM: npm
8:04:42 PM: ERR!
8:04:42 PM: npm
8:04:42 PM:  ERR!
8:04:42 PM:  Failed at the raquel-m-smith-website@0.1.0 build script.
8:04:42 PM: npm ERR!
8:04:42 PM:  This is probably not a problem with npm. There is likely additional logging output above.
8:04:42 PM: npm
8:04:42 PM:  ERR! A complete log of this run can be found in:
8:04:42 PM: npm ERR!     /opt/buildhome/.npm/_logs/2019-10-29T03_04_42_574Z-debug.log
8:04:42 PM: Skipping functions preparation step: no functions directory set
8:04:42 PM: Caching artifacts
8:04:42 PM: Started saving node modules
8:04:42 PM: Finished saving node modules
8:04:42 PM: Started saving yarn cache
8:04:42 PM: Finished saving yarn cache
8:04:42 PM: Started saving pip cache
8:04:42 PM: Finished saving pip cache
8:04:42 PM: Started saving emacs cask dependencies
8:04:42 PM: Finished saving emacs cask dependencies
8:04:42 PM: Started saving maven dependencies
8:04:42 PM: Finished saving maven dependencies
8:04:42 PM: Started saving boot dependencies
8:04:42 PM: Finished saving boot dependencies
8:04:42 PM: Started saving go dependencies
8:04:42 PM: Finished saving go dependencies
8:04:46 PM: Error running command: Build script returned non-zero exit code: 1
8:04:46 PM: Failing build: Failed to build site
8:04:46 PM: failed during stage 'building site': Build script returned non-zero exit code: 1
8:04:46 PM: Finished processing build request in 3m0.011633653s

Environment (if relevant)


  System:
    OS: macOS 10.14.6
    CPU: (4) x64 Intel(R) Core(TM) i5-8210Y CPU @ 1.60GHz
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 10.13.0 - ~/.nvm/versions/node/v10.13.0/bin/node
    Yarn: 1.19.1 - /usr/local/bin/yarn
    npm: 6.4.1 - ~/.nvm/versions/node/v10.13.0/bin/npm
  Languages:
    Python: 2.7.10 - /usr/bin/python
  Browsers:
    Chrome: 77.0.3865.120
    Safari: 12.1.2
  npmPackages:
    gatsby: ^2.1.17 => 2.17.6 
    gatsby-image: ^2.0.29 => 2.2.30 
    gatsby-plugin-emotion: ^4.0.4 => 4.1.13 
    gatsby-plugin-feed: ^2.3.19 => 2.3.19 
    gatsby-plugin-gtag: ^1.0.10 => 1.0.11 
    gatsby-plugin-manifest: ^2.2.25 => 2.2.25 
    gatsby-plugin-offline: ^2.0.24 => 2.2.10 
    gatsby-plugin-polished: ^1.0.3 => 1.0.4 
    gatsby-plugin-react-helmet: ^3.0.6 => 3.1.13 
    gatsby-plugin-remote-images: ^1.0.1 => 1.0.7 
    gatsby-plugin-robots-txt: ^1.4.0 => 1.5.0 
    gatsby-plugin-sharp: ^2.0.22 => 2.2.34 
    gatsby-plugin-sitemap: ^2.0.11 => 2.2.19 
    gatsby-plugin-typography: ^2.2.7 => 2.3.15 
    gatsby-source-filesystem: ^2.0.22 => 2.1.35 
    gatsby-source-wordpress: ^3.0.41 => 3.1.46 
    gatsby-transformer-sharp: ^2.1.14 => 2.3.1 
  npmGlobalPackages:
    gatsby-cli: 2.8.7

File contents (if changed)

gatsby-config.js: N/A package.json:

{
  "name": "raquel-m-smith-website",
  "private": true,
  "description": "The web home of Raquel M Smith, built with Gatsby JS.",
  "version": "0.1.0",
  "author": "Raquel M Smith <hello@raquelmsmith.com>",
  "dependencies": {
    "@emotion/core": "^10.0.7",
    "@emotion/styled": "^10.0.7",
    "babel-plugin-polished": "^1.1.0",
    "gatsby": "^2.1.17",
    "gatsby-image": "^2.0.29",
    "gatsby-plugin-emotion": "^4.0.4",
    "gatsby-plugin-feed": "^2.3.19",
    "gatsby-plugin-gtag": "^1.0.10",
    "gatsby-plugin-manifest": "^2.2.25",
    "gatsby-plugin-offline": "^2.0.24",
    "gatsby-plugin-polished": "^1.0.3",
    "gatsby-plugin-react-helmet": "^3.0.6",
    "gatsby-plugin-robots-txt": "^1.4.0",
    "gatsby-plugin-sharp": "^2.0.22",
    "gatsby-plugin-sitemap": "^2.0.11",
    "gatsby-plugin-typography": "^2.2.7",
    "gatsby-source-filesystem": "^2.0.22",
    "gatsby-transformer-sharp": "^2.1.14",
    "polished": "^3.0.0",
    "prop-types": "^15.7.2",
    "react": "^16.8.3",
    "react-dom": "^16.8.3",
    "react-helmet": "^5.2.0",
    "react-typography": "^0.16.18",
    "typography": "^0.16.18",
    "typography-theme-lincoln": "^0.16.18"
  },
  "devDependencies": {
    "formik": "^1.5.1",
    "gatsby-plugin-remote-images": "^1.0.1",
    "gatsby-source-wordpress": "^3.0.41",
    "html-react-parser": "^0.6.3",
    "prettier": "^1.16.4",
    "yup": "^0.26.10"
  },
  "keywords": [
    "gatsby"
  ],
  "license": "MIT",
  "scripts": {
    "build": "gatsby build",
    "develop": "gatsby develop",
    "format": "prettier --write src/**/*.{js,jsx}",
    "start": "npm run develop",
    "serve": "gatsby serve",
    "test": "echo \"Write tests! -> https://gatsby.app/unit-testing\""
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/gatsbyjs/gatsby-starter-default"
  },
  "bugs": {
    "url": "https://github.com/gatsbyjs/gatsby/issues"
  }
}

gatsby-node.js: N/A gatsby-browser.js: N/A gatsby-ssr.js: N/A

batguyz commented 4 years ago

Hi, not an expert on debugging but I suggest trying Netlify Dev. It helps you build locally on your machine and then deploys your build. It's much faster! https://www.netlify.com/products/dev/

Moreno97 commented 4 years ago

Same issue here, impossible to deploy.

LekoArts commented 4 years ago

Hey, sorry to hear that you're running into issues.

Since your error occurs at gatsby-plugin-manifest this warning is really relevant:

8:03:14 PM: warning Plugin gatsby-plugin-feed is not compatible with your gatsby version 2.1.17 - It requires gatsby@^2.4.0 8:03:15 PM: warning Plugin gatsby-plugin-manifest is not compatible with your gatsby version 2.1.17 - It requires gatsby@^2.4.0

Please update all your dependencies to the latest versions and commit the package-lock.json/yarn.lock file.

Also change your .nvmrc file to Node 12 and upgrade your local version of Node to 12.

Moreno97 commented 4 years ago

Hello @LekoArts , here is my error log, it's a bit different and it's not caused by any outdated libraries, all the dependencies are up to date:

3:45:18 PM: Build ready to start
3:45:21 PM: build-image version: 9e0f207a27642d0115b1ca97cd5e8cebbe492f63
3:45:21 PM: build-image tag: v3.3.2
3:45:21 PM: buildbot version: a2bab682ae0761baa4d123ebd00c57be933655dc
3:45:22 PM: Fetching cached dependencies
3:45:22 PM: Starting to download cache of 4.0MB
3:45:22 PM: Finished downloading cache in 123.221587ms
3:45:22 PM: Starting to extract cache
3:45:22 PM: Finished extracting cache in 58.300776ms
3:45:22 PM: Finished fetching cache in 184.008426ms
3:45:22 PM: Starting to prepare the repo for build
3:45:22 PM: Preparing Git Reference refs/heads/master
3:45:23 PM: Starting build script
3:45:23 PM: Installing dependencies
3:45:25 PM: Downloading and installing node v10.17.0...
3:45:25 PM: Downloading https://nodejs.org/dist/v10.17.0/node-v10.17.0-linux-x64.tar.xz...
3:45:25 PM:   0.0%
3:45:25 PM: 
#####
3:45:25 PM:                       7.4%
3:45:25 PM: 
#################
3:45:25 PM:                                           23.7%
3:45:26 PM: 
########################
3:45:26 PM:                                               34.1%
3:45:26 PM: 
##########
3:45:26 PM: #########################                                       49.6%
3:45:26 PM: 
#########################
3:45:26 PM: ########################                         69.4%
3:45:26 PM: 
######################################################
3:45:26 PM: ##########          88.9%
3:45:26 PM: 
#######################################
3:45:26 PM: ###########################        92.2%
3:45:26 PM: 
#######################################################
3:45:26 PM: ################# 100.0%
3:45:26 PM: Computing checksum with sha256sum
3:45:26 PM: Checksums matched!
3:45:29 PM: Now using node v10.17.0 (npm v6.11.3)
3:45:29 PM: Attempting ruby version 2.6.2, read from environment
3:45:31 PM: Using ruby version 2.6.2
3:45:31 PM: Using PHP version 5.6
3:45:31 PM: Started restoring cached node modules
3:45:31 PM: Finished restoring cached node modules
3:45:31 PM: Installing NPM modules using NPM version 6.11.3
3:46:19 PM: > sharp@0.23.2 install /opt/build/repo/node_modules/gatsby-plugin-manifest/node_modules/sharp
3:46:19 PM: > (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
3:46:19 PM: info
3:46:19 PM: sharp
3:46:19 PM:  Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.8.1/libvips-8.8.1-linux-x64.tar.gz
3:46:22 PM: > sharp@0.23.2 install /opt/build/repo/node_modules/gatsby-transformer-sharp/node_modules/sharp
3:46:22 PM: > (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
3:46:22 PM: info
3:46:22 PM: sharp
3:46:22 PM:  Using cached /opt/buildhome/.npm/_libvips/libvips-8.8.1-linux-x64.tar.gz
3:46:23 PM: > sharp@0.22.1 install /opt/build/repo/node_modules/sharp
3:46:23 PM: > (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
3:46:24 PM: info
3:46:24 PM: sharp
3:46:24 PM:  Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.7.4/libvips-8.7.4-linux-x64.tar.gz
3:46:26 PM: > core-js@2.6.10 postinstall /opt/build/repo/node_modules/@babel/polyfill/node_modules/core-js
3:46:26 PM: > node postinstall || echo "ignore"
3:46:26 PM: Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
3:46:26 PM: The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: 
3:46:26 PM: > https://opencollective.com/core-js 
3:46:26 PM: > https://www.patreon.com/zloirock 
3:46:26 PM: Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
3:46:26 PM: > core-js@2.6.10 postinstall /opt/build/repo/node_modules/@gatsbyjs/relay-compiler/node_modules/core-js
3:46:26 PM: > node postinstall || echo "ignore"
3:46:26 PM: > core-js@2.6.10 postinstall /opt/build/repo/node_modules/@jimp/bmp/node_modules/core-js
3:46:26 PM: > node postinstall || echo "ignore"
3:46:26 PM: > core-js@2.6.10 postinstall /opt/build/repo/node_modules/@jimp/core/node_modules/core-js
3:46:26 PM: > node postinstall || echo "ignore"
3:46:26 PM: > core-js@2.6.10 postinstall /opt/build/repo/node_modules/@jimp/custom/node_modules/core-js
3:46:26 PM: > node postinstall || echo "ignore"
3:46:27 PM: > core-js@2.6.10 postinstall /opt/build/repo/node_modules/@jimp/gif/node_modules/core-js
3:46:27 PM: > node postinstall || echo "ignore"
3:46:27 PM: > core-js@2.6.10 postinstall /opt/build/repo/node_modules/@jimp/jpeg/node_modules/core-js
3:46:27 PM: > node postinstall || echo "ignore"
3:46:27 PM: > core-js@2.6.10 postinstall /opt/build/repo/node_modules/@jimp/plugin-blit/node_modules/core-js
3:46:27 PM: > node postinstall || echo "ignore"
3:46:27 PM: > core-js@2.6.10 postinstall /opt/build/repo/node_modules/@jimp/plugin-blur/node_modules/core-js
3:46:27 PM: > node postinstall || echo "ignore"
3:46:27 PM: > core-js@2.6.10 postinstall /opt/build/repo/node_modules/@jimp/plugin-color/node_modules/core-js
3:46:27 PM: > node postinstall || echo "ignore"
3:46:27 PM: > core-js@2.6.10 postinstall /opt/build/repo/node_modules/@jimp/plugin-contain/node_modules/core-js
3:46:27 PM: > node postinstall || echo "ignore"
3:46:27 PM: > core-js@2.6.10 postinstall /opt/build/repo/node_modules/@jimp/plugin-cover/node_modules/core-js
3:46:27 PM: > node postinstall || echo "ignore"
3:46:27 PM: > core-js@2.6.10 postinstall /opt/build/repo/node_modules/@jimp/plugin-crop/node_modules/core-js
3:46:27 PM: > node postinstall || echo "ignore"
3:46:27 PM: > core-js@2.6.10 postinstall /opt/build/repo/node_modules/@jimp/plugin-displace/node_modules/core-js
3:46:27 PM: > node postinstall || echo "ignore"
3:46:28 PM: > core-js@2.6.10 postinstall /opt/build/repo/node_modules/@jimp/plugin-dither/node_modules/core-js
3:46:28 PM: > node postinstall || echo "ignore"
3:46:28 PM: > core-js@2.6.10 postinstall /opt/build/repo/node_modules/@jimp/plugin-flip/node_modules/core-js
3:46:28 PM: > node postinstall || echo "ignore"
3:46:28 PM: > core-js@2.6.10 postinstall /opt/build/repo/node_modules/@jimp/plugin-gaussian/node_modules/core-js
3:46:28 PM: > node postinstall || echo "ignore"
3:46:28 PM: > core-js@2.6.10 postinstall /opt/build/repo/node_modules/@jimp/plugin-invert/node_modules/core-js
3:46:28 PM: > node postinstall || echo "ignore"
3:46:28 PM: > core-js@2.6.10 postinstall /opt/build/repo/node_modules/@jimp/plugin-mask/node_modules/core-js
3:46:28 PM: > node postinstall || echo "ignore"
3:46:28 PM: > core-js@2.6.10 postinstall /opt/build/repo/node_modules/@jimp/plugin-normalize/node_modules/core-js
3:46:28 PM: > node postinstall || echo "ignore"
3:46:28 PM: > core-js@2.6.10 postinstall /opt/build/repo/node_modules/@jimp/plugin-print/node_modules/core-js
3:46:28 PM: > node postinstall || echo "ignore"
3:46:28 PM: > core-js@2.6.10 postinstall /opt/build/repo/node_modules/@jimp/plugin-resize/node_modules/core-js
3:46:28 PM: > node postinstall || echo "ignore"
3:46:28 PM: > core-js@2.6.10 postinstall /opt/build/repo/node_modules/@jimp/plugin-rotate/node_modules/core-js
3:46:28 PM: > node postinstall || echo "ignore"
3:46:28 PM: > core-js@2.6.10 postinstall /opt/build/repo/node_modules/@jimp/plugin-scale/node_modules/core-js
3:46:28 PM: > node postinstall || echo "ignore"
3:46:29 PM: > core-js@2.6.10 postinstall /opt/build/repo/node_modules/@jimp/plugins/node_modules/core-js
3:46:29 PM: > node postinstall || echo "ignore"
3:46:29 PM: > core-js@2.6.10 postinstall /opt/build/repo/node_modules/@jimp/png/node_modules/core-js
3:46:29 PM: > node postinstall || echo "ignore"
3:46:29 PM: > core-js@2.6.10 postinstall /opt/build/repo/node_modules/@jimp/tiff/node_modules/core-js
3:46:29 PM: > node postinstall || echo "ignore"
3:46:29 PM: > core-js@2.6.10 postinstall /opt/build/repo/node_modules/@jimp/types/node_modules/core-js
3:46:29 PM: > node postinstall || echo "ignore"
3:46:29 PM: > core-js@2.6.10 postinstall /opt/build/repo/node_modules/@jimp/utils/node_modules/core-js
3:46:29 PM: > node postinstall || echo "ignore"
3:46:29 PM: > core-js@2.6.10 postinstall /opt/build/repo/node_modules/babel-runtime/node_modules/core-js
3:46:29 PM: > node postinstall || echo "ignore"
3:46:29 PM: > core-js@2.6.10 postinstall /opt/build/repo/node_modules/favicons-webpack-plugin/node_modules/core-js
3:46:29 PM: > node postinstall || echo "ignore"
3:46:29 PM: > core-js@3.3.5 postinstall /opt/build/repo/node_modules/favicons/node_modules/core-js
3:46:29 PM: > node postinstall || echo "ignore"
3:46:30 PM: > core-js@2.6.10 postinstall /opt/build/repo/node_modules/gatsby/node_modules/core-js
3:46:30 PM: > node postinstall || echo "ignore"
3:46:30 PM: > core-js@2.6.10 postinstall /opt/build/repo/node_modules/jimp/node_modules/core-js
3:46:30 PM: > node postinstall || echo "ignore"
3:46:30 PM: > core-js@2.6.10 postinstall /opt/build/repo/node_modules/potrace/node_modules/core-js
3:46:30 PM: > node postinstall || echo "ignore"
3:46:30 PM: > core-js@2.6.10 postinstall /opt/build/repo/node_modules/relay-runtime/node_modules/core-js
3:46:30 PM: > node postinstall || echo "ignore"
3:46:30 PM: > gatsby-telemetry@1.1.35 postinstall /opt/build/repo/node_modules/gatsby-telemetry
3:46:30 PM: > node src/postinstall.js
3:46:30 PM: > cwebp-bin@5.1.0 postinstall /opt/build/repo/node_modules/cwebp-bin
3:46:30 PM: > node lib/install.js
3:46:32 PM:   ✔ cwebp pre-build test passed successfully
3:46:32 PM: > mozjpeg@6.0.1 postinstall /opt/build/repo/node_modules/mozjpeg
3:46:32 PM: > node lib/install.js
3:46:32 PM:   ✔ mozjpeg pre-build test passed successfully
3:46:32 PM: > pngquant-bin@5.0.2 postinstall /opt/build/repo/node_modules/pngquant-bin
3:46:32 PM: > node lib/install.js
3:46:33 PM:   ✔ pngquant pre-build test passed successfully
3:46:33 PM: > gatsby-cli@2.8.8 postinstall /opt/build/repo/node_modules/gatsby/node_modules/gatsby-cli
3:46:33 PM: > node scripts/postinstall.js
3:46:33 PM: > gatsby@2.17.7 postinstall /opt/build/repo/node_modules/gatsby
3:46:33 PM: > node scripts/postinstall.js
3:46:33 PM: > styled-components@4.4.1 postinstall /opt/build/repo/node_modules/styled-components
3:46:33 PM: > node ./scripts/postinstall.js || exit 0
3:46:33 PM: Use styled-components at work? Consider supporting our development efforts at https://opencollective.com/styled-components
3:46:36 PM: npm
3:46:36 PM:  WARN optional
3:46:36 PM:  SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/fsevents):
3:46:36 PM: npm
3:46:36 PM:  WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
3:46:36 PM: npm WARN
3:46:36 PM:  optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.1 (node_modules/chokidar/node_modules/fsevents):
3:46:36 PM: npm WARN
3:46:36 PM: notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
3:46:36 PM: added 2134 packages from 1025 contributors and audited 26359 packages in 63.638s
3:46:36 PM: found 0 vulnerabilities
3:46:36 PM: NPM modules installed
3:46:36 PM: Started restoring cached go cache
3:46:36 PM: Finished restoring cached go cache
3:46:36 PM: unset GOOS;
3:46:36 PM: unset GOARCH;
3:46:36 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.12.linux.amd64';
3:46:36 PM: export PATH="/opt/buildhome/.gimme/versions/go1.12.linux.amd64/bin:${PATH}";
3:46:36 PM: go version >&2;
3:46:36 PM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.12.linux.amd64.env';
3:46:36 PM: go version go1.12 linux/amd64
3:46:36 PM: Installing missing commands
3:46:36 PM: Verify run directory
3:46:36 PM: Executing user command: npm run build
3:46:37 PM: > moreno97.github.io@0.1.1 build /opt/build/repo
3:46:37 PM: > gatsby build
3:46:40 PM: success open and validate gatsby-configs - 0.072s
3:46:41 PM: success load plugins - 1.005s
3:46:41 PM: success onPreInit - 0.003s
3:46:41 PM: success delete html and css files from previous builds - 0.019s
3:46:41 PM: success initialize cache - 0.009s
3:46:41 PM: success copy gatsby files - 0.044s
3:46:41 PM: success onPreBootstrap - 0.015s
3:46:45 PM: success source and transform nodes - 4.123s
3:46:45 PM: success building schema - 0.376s
3:46:45 PM: success createPages - 0.019s
3:46:45 PM: success createPagesStatefully - 0.084s
3:46:45 PM: success onPreExtractQueries - 0.003s
3:46:45 PM: success update schema - 0.048s
3:46:46 PM: success extract queries from components - 0.420s
3:46:46 PM: success write out requires - 0.005s
3:46:46 PM: success write out redirect data - 0.001s
3:46:46 PM: warning The icon(./static/favicon/favicon-512.png) you provided to 'gatsby-plugin-manifest' is not square.
3:46:46 PM: The icons we generate will be square and for the best results we recommend you provide a square icon.
3:46:46 PM: node: symbol lookup error: /opt/build/repo/node_modules/gatsby-plugin-manifest/node_modules/sharp/build/Release/sharp.node: undefined symbol: _ZNK4vips6VImage13icc_transformEPKcPNS_7VOptionE
3:46:46 PM: npm
3:46:46 PM:  ERR!
3:46:46 PM: code ELIFECYCLE
3:46:46 PM: npm
3:46:46 PM: ERR! syscall spawn
3:46:46 PM: npm
3:46:46 PM:  ERR!
3:46:46 PM:  file
3:46:46 PM:  sh
3:46:46 PM: npm
3:46:46 PM: ERR! errno
3:46:46 PM:  ENOENT
3:46:46 PM: npm
3:46:46 PM:  ERR!
3:46:46 PM:  moreno97.github.io@0.1.1 build: `gatsby build`
3:46:46 PM: npm
3:46:46 PM:  ERR! spawn ENOENT
3:46:46 PM: npm
3:46:46 PM:  ERR!
3:46:46 PM: npm ERR!
3:46:46 PM:  Failed at the moreno97.github.io@0.1.1 build script.
3:46:46 PM: npm
3:46:46 PM:  ERR! This is probably not a problem with npm. There is likely additional logging output above.
3:46:46 PM: npm
3:46:46 PM:  ERR! A complete log of this run can be found in:
3:46:46 PM: npm ERR!
3:46:46 PM:      /opt/buildhome/.npm/_logs/2019-10-31T14_46_46_448Z-debug.log
3:46:46 PM: Skipping functions preparation step: no functions directory set
3:46:46 PM: Caching artifacts
3:46:46 PM: Started saving node modules
3:46:46 PM: Finished saving node modules
3:46:46 PM: Started saving pip cache
3:46:46 PM: Finished saving pip cache
3:46:46 PM: Started saving emacs cask dependencies
3:46:46 PM: Finished saving emacs cask dependencies
3:46:46 PM: Started saving maven dependencies
3:46:46 PM: Finished saving maven dependencies
3:46:46 PM: Started saving boot dependencies
3:46:46 PM: Finished saving boot dependencies
3:46:46 PM: Started saving go dependencies
3:46:46 PM: Finished saving go dependencies
3:46:49 PM: Error running command: Build script returned non-zero exit code: 1
3:46:49 PM: Failing build: Failed to build site
3:46:49 PM: failed during stage 'building site': Build script returned non-zero exit code: 1
3:46:49 PM: Finished processing build request in 1m27.927175344s

I think the error is related with this line: 8:04:42 PM: node: symbol lookup error: /opt/build/repo/node_modules/gatsby-plugin-manifest/node_modules/sharp/build/Release/sharp.node: undefined symbol: _ZNK4vips6VImage13icc_transformEPKcPNS_7VOptionE

smakosh commented 4 years ago

Having the same issue as @Moreno97

raquelmsmith commented 4 years ago

I installed Dependabot and found that gatsby-plugin-sharp needed to be updated. When that was updated the build ran successfully. I'd recommend installing Dependabot for anyone who is experiencing this type of issue!

smakosh commented 4 years ago

In my case I used these versions precisely to resolve the issue

gatsby-plugin-manifest@2.2.16
gatsby-plugin-offline@3.0.14
gatsby-transformer-sharp@2.2.14
gatsby-plugin-sharp@2.2.29
yarn add gatsby-plugin-manifest@2.2.16 gatsby-plugin-offline@3.0.14 gatsby-transformer-sharp@2.2.14 gatsby-plugin-sharp@2.2.29
Moreno97 commented 4 years ago

@raquelmsmith @smakosh it's working with the new dependencies, thanks a lot for the help :)

gaboesquivel commented 4 years ago

yeah rolling sharp plugin worked for me on mac. but it fails on netlify with yarn.lock with node: symbol lookup error: /opt/build/repo/node_modules/gatsby-plugin-manifest/node_modules/sharp/build/Release/sharp.node: undefined symbol: _ZNK4vips6VImage7pngsaveEPKcPNS_7VOptionE

had to build locally and upload the public/ dir

pvdz commented 4 years ago

Fwiw, for somebody looking for answers on why sharp isn't working, or after this error:

Something went wrong installing the "sharp" module

Module did not self-register.

- Remove the "node_modules/sharp" directory, run "npm install" and look for errors
- Consult the installation documentation at https://sharp.pixelplumbing.com/en/stable/install/
- Search for this error at https://github.com/lovell/sharp/issues

One problem might be that the module was first installed with a different node version. When installing it checks the node version and downloads a special binary compiled for that node version. This binary is cached. When you switch node versions, the binary is not updated and so it breaks.

One solution is to clear the npm cache (~/.npm/_cacache), node_modules, and reinstall. You should see messages about sharp downloading one or (probably) two binaries. If that's the case and the problem persists, your problem is something else. But otherwise I hope these steps unblock you :)

kudos commented 4 years ago

This seems to be an issue with yarn vs npm. In a clean environment I can run gatsby with npm installed modules, but not with yarn installed.

nimaiwalsh commented 3 years ago

I had the same issue, upgrading Sharp caused all other issues for me.

Turns out, Netlify is building with Node 12+ while I'm building my project successfully locally with Node 10.

You can specify what version of Node netlfiy builds with by setting a NODE_VERSION environment variable.

https://docs.netlify.com/configure-builds/manage-dependencies/