Closed raquelmsmith closed 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/
Same issue here, impossible to deploy.
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.
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
Having the same issue as @Moreno97
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!
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
@raquelmsmith @smakosh it's working with the new dependencies, thanks a lot for the help :)
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
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 :)
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.
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/
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:
Environment (if relevant)
File contents (if changed)
gatsby-config.js
: N/Apackage.json
:gatsby-node.js
: N/Agatsby-browser.js
: N/Agatsby-ssr.js
: N/A