Home
Support Forums

Gatsby Build Error

Hi, I tried to deploy my github site but failed. I don’t know what’s error. Could you help?

  • Netlify sitename: visualizezemv2

Build log

1:30:22 PM: Build ready to start
1:30:24 PM: build-image version: 73def8bb10593b9b818f44989a75ea508018ccb7 (focal)
1:30:24 PM: build-image tag: v4.5.2
1:30:24 PM: buildbot version: ff9e2433dccff2a568f42fdd27a8e92c84c8a325
1:30:24 PM: Fetching cached dependencies
1:30:24 PM: Failed to fetch cache, continuing with build
1:30:24 PM: Starting to prepare the repo for build
1:30:25 PM: No cached dependencies found. Cloning fresh repo
1:30:25 PM: git clone https://github.com/tantrongtt/visualize-lesson
1:30:44 PM: Preparing Git Reference refs/heads/master
1:30:45 PM: Parsing package.json dependencies
1:30:46 PM: Starting build script
1:30:46 PM: Installing dependencies
1:30:46 PM: Python version set to 2.7
1:30:47 PM: v16.13.1 is already installed.
1:30:48 PM: Now using node v16.13.1 (npm v8.1.2)
1:30:48 PM: Started restoring cached build plugins
1:30:48 PM: Finished restoring cached build plugins
1:30:48 PM: Attempting ruby version 2.7.2, read from environment
1:30:49 PM: Using ruby version 2.7.2
1:30:50 PM: Using PHP version 8.0
1:30:50 PM: Started restoring cached yarn cache
1:30:50 PM: Finished restoring cached yarn cache
1:30:50 PM: Yarn workspaces detected
1:30:50 PM: Installing NPM modules using Yarn version 1.22.10
1:30:51 PM: yarn install v1.22.10
1:30:51 PM: [1/4] Resolving packages...
1:30:52 PM: [2/4] Fetching packages...
1:31:07 PM: warning url-loader@1.1.2: Invalid bin field for "url-loader".
1:31:26 PM: info fsevents@2.1.2: The platform "linux" is incompatible with this module.
1:31:26 PM: info "fsevents@2.1.2" is an optional dependency and failed compatibility check. Excluding it from installation.
1:31:26 PM: info fsevents@1.2.11: The platform "linux" is incompatible with this module.
1:31:26 PM: info "fsevents@1.2.11" is an optional dependency and failed compatibility check. Excluding it from installation.
1:31:26 PM: [3/4] Linking dependencies...
1:31:26 PM: warning " > @narative/gatsby-theme-novela@0.11.2" has unmet peer dependency "gatsby@^2.15.7".
1:31:26 PM: warning " > @narative/gatsby-theme-novela@0.11.2" has unmet peer dependency "react@^16.8.6".
1:31:26 PM: warning " > @narative/gatsby-theme-novela@0.11.2" has unmet peer dependency "react-dom@^16.8.6".
1:31:26 PM: warning "workspace-aggregator-7d62ea16-b92c-4162-b0fe-9012c0f6fcf6 > @narative/gatsby-theme-novela > gatsby-remark-prismjs@3.3.28" has unmet peer dependency "prismjs@^1.15.0".
1:31:26 PM: warning "workspace-aggregator-7d62ea16-b92c-4162-b0fe-9012c0f6fcf6 > @narative/gatsby-theme-novela > react-medium-image-zoom@3.1.2" has unmet peer dependency "prop-types@^15.5.8".
1:31:26 PM: warning "workspace-aggregator-7d62ea16-b92c-4162-b0fe-9012c0f6fcf6 > @narative/gatsby-theme-novela > gatsby > react-hot-loader@4.12.18" has unmet peer dependency "@types/react@^15.0.0 || ^16.0.0".
1:31:26 PM: warning "workspace-aggregator-7d62ea16-b92c-4162-b0fe-9012c0f6fcf6 > @narative/gatsby-theme-novela > gatsby-plugin-emotion > @emotion/babel-preset-css-prop@10.0.27" has unmet peer dependency "@babel/core@^7.0.0".
1:31:26 PM: warning "workspace-aggregator-7d62ea16-b92c-4162-b0fe-9012c0f6fcf6 > @narative/gatsby-theme-novela > gatsby-plugin-typescript > @babel/plugin-proposal-nullish-coalescing-operator@7.7.4" has unmet peer dependency "@babel/core@^7.0.0-0".
1:31:26 PM: warning "workspace-aggregator-7d62ea16-b92c-4162-b0fe-9012c0f6fcf6 > @narative/gatsby-theme-novela > gatsby-plugin-typescript > @babel/plugin-proposal-numeric-separator@7.7.4" has unmet peer dependency "@babel/core@^7.0.0-0".
1:31:26 PM: warning "workspace-aggregator-7d62ea16-b92c-4162-b0fe-9012c0f6fcf6 > @narative/gatsby-theme-novela > gatsby-plugin-typescript > @babel/plugin-proposal-optional-chaining@7.7.5" has unmet peer dependency "@babel/core@^7.0.0-0".
1:31:26 PM: warning "workspace-aggregator-7d62ea16-b92c-4162-b0fe-9012c0f6fcf6 > @narative/gatsby-theme-novela > gatsby-plugin-typescript > @babel/preset-typescript@7.7.7" has unmet peer dependency "@babel/core@^7.0.0-0".
1:31:26 PM: warning "workspace-aggregator-7d62ea16-b92c-4162-b0fe-9012c0f6fcf6 > @narative/gatsby-theme-novela > gatsby > @typescript-eslint/eslint-plugin > tsutils@3.17.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:31:26 PM: warning "workspace-aggregator-7d62ea16-b92c-4162-b0fe-9012c0f6fcf6 > @narative/gatsby-theme-novela > gatsby > gatsby-cli > ink@2.6.0" has unmet peer dependency "@types/react@>=16.8.0".
1:31:26 PM: warning "workspace-aggregator-7d62ea16-b92c-4162-b0fe-9012c0f6fcf6 > @narative/gatsby-theme-novela > gatsby-plugin-emotion > @emotion/babel-preset-css-prop > @babel/plugin-transform-react-jsx@7.7.7" has unmet peer dependency "@babel/core@^7.0.0-0".
1:31:26 PM: warning "workspace-aggregator-7d62ea16-b92c-4162-b0fe-9012c0f6fcf6 > @narative/gatsby-theme-novela > gatsby-plugin-emotion > @emotion/babel-preset-css-prop > @emotion/babel-plugin-jsx-pragmatic@0.1.5" has unmet peer dependency "@babel/core@^7.0.0".
1:31:26 PM: warning "workspace-aggregator-7d62ea16-b92c-4162-b0fe-9012c0f6fcf6 > @narative/gatsby-theme-novela > gatsby-plugin-typescript > @babel/plugin-proposal-nullish-coalescing-operator > @babel/plugin-syntax-nullish-coalescing-operator@7.7.4" has unmet peer dependency "@babel/core@^7.0.0-0".
1:31:26 PM: warning "workspace-aggregator-7d62ea16-b92c-4162-b0fe-9012c0f6fcf6 > @narative/gatsby-theme-novela > gatsby-plugin-typescript > @babel/plugin-proposal-numeric-separator > @babel/plugin-syntax-numeric-separator@7.7.4" has unmet peer dependency "@babel/core@^7.0.0-0".
1:31:26 PM: warning "workspace-aggregator-7d62ea16-b92c-4162-b0fe-9012c0f6fcf6 > @narative/gatsby-theme-novela > gatsby-plugin-typescript > @babel/plugin-proposal-optional-chaining > @babel/plugin-syntax-optional-chaining@7.7.4" has unmet peer dependency "@babel/core@^7.0.0-0".
1:31:26 PM: warning "workspace-aggregator-7d62ea16-b92c-4162-b0fe-9012c0f6fcf6 > @narative/gatsby-theme-novela > gatsby-plugin-typescript > @babel/preset-typescript > @babel/plugin-transform-typescript@7.7.4" has unmet peer dependency "@babel/core@^7.0.0-0".
1:31:26 PM: warning "workspace-aggregator-7d62ea16-b92c-4162-b0fe-9012c0f6fcf6 > @narative/gatsby-theme-novela > gatsby-plugin-typescript > @babel/preset-typescript > @babel/plugin-transform-typescript > @babel/plugin-syntax-typescript@7.7.4" has unmet peer dependency "@babel/core@^7.0.0-0".
1:31:47 PM: [4/4] Building fresh packages...
1:31:59 PM: error /opt/build/repo/node_modules/sharp: Command failed.
1:31:59 PM: Exit code: 1
1:31:59 PM: Command: (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
1:31:59 PM: Arguments:
1:31:59 PM: Directory: /opt/build/repo/node_modules/sharp
1:31:59 PM: Output:
1:31:59 PM: info sharp Detected globally-installed libvips v8.9.1
1:31:59 PM: info sharp Building from source via node-gyp
1:31:59 PM: gyp info it worked if it ends with ok
1:31:59 PM: gyp info using node-gyp@5.0.7
1:31:59 PM: gyp info using node@16.13.1 | linux | x64
1:31:59 PM: gyp info find Python using Python version 2.7.18 found at "/opt/buildhome/python2.7/bin/python"
1:31:59 PM: gyp http GET https://nodejs.org/download/release/v16.13.1/node-v16.13.1-headers.tar.gz
1:31:59 PM: gyp http 200 https://nodejs.org/download/release/v16.13.1/node-v16.13.1-headers.tar.gz
1:31:59 PM: gyp http GET https://nodejs.org/download/release/v16.13.1/SHASUMS256.txt
1:31:59 PM: gyp http 200 https://nodejs.org/download/release/v16.13.1/SHASUMS256.txt
1:31:59 PM: (node:1691) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
1:31:59 PM: (Use `node --trace-deprecation ...` to show where the warning was created)
1:31:59 PM: gyp info spawn /opt/buildhome/python2.7/bin/python
1:31:59 PM: gyp info spawn args [
1:31:59 PM: gyp info spawn args   '/opt/build/repo/node_modules/node-gyp/gyp/gyp_main.py',
1:31:59 PM: gyp info spawn args   'binding.gyp',
1:31:59 PM: gyp info spawn args   '-f',
1:31:59 PM: gyp info spawn args   'make',
1:31:59 PM: gyp info spawn args   '-I',
1:31:59 PM: gyp info spawn args   '/opt/build/repo/node_modules/sharp/build/config.gypi',
1:31:59 PM: gyp info spawn args   '-I',
1:31:59 PM: gyp info spawn args   '/opt/build/repo/node_modules/node-gyp/addon.gypi',
1:31:59 PM: gyp info spawn args   '-I',
1:31:59 PM: gyp info spawn args   '/opt/buildhome/.cache/node-gyp/16.13.1/include/node/common.gypi',
1:31:59 PM: gyp info spawn args   '-Dlibrary=shared_library',
1:31:59 PM: gyp info spawn args   '-Dvisibility=default',
1:31:59 PM: gyp info spawn args   '-Dnode_root_dir=/opt/buildhome/.cache/node-gyp/16.13.1',
1:31:59 PM: gyp info spawn args   '-Dnode_gyp_dir=/opt/build/repo/node_modules/node-gyp',
1:31:59 PM: gyp info spawn args   '-Dnode_lib_file=/opt/buildhome/.cache/node-gyp/16.13.1/<(target_arch)/node.lib',
1:31:59 PM: gyp info spawn args   '-Dmodule_root_dir=/opt/build/repo/node_modules/sharp',
1:31:59 PM: gyp info spawn args   '-Dnode_engine=v8',
1:31:59 PM: gyp info spawn args   '--depth=.',
1:31:59 PM: gyp info spawn args   '--no-parallel',
1:31:59 PM: gyp info spawn args   '--generator-output',
1:31:59 PM: gyp info spawn args   'build',
1:31:59 PM: gyp info spawn args   '-Goutput_dir=.'
1:31:59 PM: gyp info spawn args ]
1:31:59 PM: gyp info spawn make
1:31:59 PM: gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
1:31:59 PM: make: Entering directory '/opt/build/repo/node_modules/sharp/build'
1:31:59 PM:   TOUCH Release/obj.target/libvips-cpp.stamp
1:31:59 PM:   CXX(target) Release/obj.target/sharp/src/common.o
1:31:59 PM: In file included from /opt/buildhome/.cache/node-gyp/16.13.1/include/node/v8.h:30,
1:31:59 PM: Creating deploy upload records
1:31:59 PM:                  from /opt/buildhome/.cache/node-gyp/16.13.1/include/node/node.h:63,
1:31:59 PM:                  from ../src/common.cc:22:
1:31:59 PM: /opt/buildhome/.cache/node-gyp/16.13.1/include/node/v8-internal.h: In function ‘void v8::internal::PerformCastCheck(T*)’:
1:31:59 PM: /opt/buildhome/.cache/node-gyp/16.13.1/include/node/v8-internal.h:492:38: error: ‘remove_cv_t’ is not a member of ‘std’; did you mean ‘remove_cv’?
1:31:59 PM:   492 |             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
1:31:59 PM:       |                                      ^~~~~~~~~~~
1:31:59 PM:       |                                      remove_cv
1:31:59 PM: /opt/buildhome/.cache/node-gyp/16.13.1/include/node/v8-internal.h:492:38: error: ‘remove_cv_t’ is not a member of ‘std’; did you mean ‘remove_cv’?
1:31:59 PM:   492 |             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
1:31:59 PM:       |                                      ^~~~~~~~~~~
1:31:59 PM:       |                                      remove_cv
1:31:59 PM: /opt/buildhome/.cache/node-gyp/16.13.1/include/node/v8-internal.h:492:50: error: template argument 2 is invalid
1:31:59 PM:   492 |             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
1:31:59 PM:       |                                                  ^
1:31:59 PM: /opt/buildhome/.cache/node-gyp/16.13.1/include/node/v8-internal.h:492:63: error: ‘::Perform’ has not been declared
1:31:59 PM:   492 |             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
1:31:59 PM:       |                                                               ^~~~~~~
1:31:59 PM: make: *** [sharp.target.mk:183: Release/obj.target/sharp/src/common.o] Error 1
1:31:59 PM: make: Leaving directory '/opt/build/repo/node_modules/sharp/build'
1:31:59 PM: gyp ERR! build error
1:31:59 PM: gyp ERR! stack Error: `make` failed with exit code: 2
1:31:59 PM: gyp ERR! stack     at ChildProcess.onExit (/opt/build/repo/node_modules/node-gyp/lib/build.js:194:23)
1:31:59 PM: gyp ERR! stack     at ChildProcess.emit (node:events:390:28)
1:31:59 PM: gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
1:31:59 PM: gyp ERR! System Linux 5.4.129+
1:31:59 PM: gyp ERR! command "/opt/buildhome/.nvm/versions/node/v16.13.1/bin/node" "/opt/build/repo/node_modules/.bin/node-gyp" "rebuild"
1:31:59 PM: gyp ERR! cwd /opt/build/repo/node_modules/sharp
1:31:59 PM: gyp ERR! node -v v16.13.1
1:31:59 PM: Failed during stage 'building site': Build script returned non-zero exit code: 1
1:31:59 PM: gyp ERR! node-gyp -v v5.0.7
1:31:59 PM: gyp ERR! not ok
1:31:59 PM: info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
1:31:59 PM: Error during Yarn install
1:31:59 PM: Build was terminated: Build script returned non-zero exit code: 1
1:31:59 PM: Failing build: Failed to build site
1:31:59 PM: Finished processing build request in 1m35.010207529s

Hey @tantrongtt,

You need to set NODE_VERSION environment variable with value 14.17.5.