Home
Support Forums

Gatsby-simplefolio site deploy failing

I need advice to debug deploy Netlify App

I am trying to deploy GitHub - cobidev/gatsby-simplefolio: ⚡️ A minimal Gatsby portfolio template for Developers.
I made a fork of above repo and giving my forked repo for netlify to deploy but it is failing.
In the past too whenever I have tried to deploy an existing working repo, deployment would fail.
Is there anything that I am missing? The error messages are not helpful either.

Thanks in advance.

Relevant build log (wasn’t able to add entire build log)

4:36:22 PM: Build ready to start
4:36:24 PM: build-image version: 081db65c3e4ce8423fedb40e7689a87de6f84667
4:36:24 PM: build-image tag: v4.3.1
4:36:24 PM: buildbot version: 1523fa12d6de79e532ed0aff71973c5fbb8e58aa
4:36:24 PM: Fetching cached dependencies
4:36:24 PM: Failed to fetch cache, continuing with build
4:36:24 PM: Starting to prepare the repo for build
4:36:25 PM: No cached dependencies found. Cloning fresh repo
4:36:25 PM: git clone https://github.com/nikhilno1/gatsby-simplefolio
4:36:25 PM: Preparing Git Reference refs/heads/master
4:36:26 PM: Parsing package.json dependencies
4:36:26 PM: Starting build script
4:36:26 PM: Installing dependencies
4:36:26 PM: Python version set to 2.7
4:36:27 PM: Downloading and installing node v16.10.0...
4:36:27 PM: Downloading https://nodejs.org/dist/v16.10.0/node-v16.10.0-linux-x64.tar.xz...
4:36:27 PM: Computing checksum with sha256sum
4:36:28 PM: Checksums matched!
4:36:30 PM: Now using node v16.10.0 (npm v7.24.0)
4:36:30 PM: Started restoring cached build plugins
4:36:30 PM: Finished restoring cached build plugins
4:36:30 PM: Attempting ruby version 2.7.2, read from environment
4:36:32 PM: Using ruby version 2.7.2
4:36:32 PM: Using PHP version 8.0
4:36:32 PM: Started restoring cached node modules
4:36:32 PM: Finished restoring cached node modules
4:36:32 PM: Installing NPM modules using NPM version 7.24.0
4:37:36 PM: npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
4:37:36 PM: npm WARN deprecated har-validator@5.1.5: this library is no longer supported
4:37:36 PM: npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
4:37:38 PM: npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
4:37:39 PM: npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
4:37:43 PM: npm WARN deprecated querystring@0.2.1: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
4:37:48 PM: npm WARN deprecated @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained
4:37:48 PM: npm WARN deprecated @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained
4:37:51 PM: npm WARN deprecated @hapi/address@2.1.4: Moved to 'npm install @sideway/address'
4:37:51 PM: npm WARN deprecated @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained
4:37:51 PM: npm WARN deprecated babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
4:37:52 PM: npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
4:37:53 PM: npm WARN deprecated gatsby-image@2.11.0: This package has been deprecated in favor of gatsby-plugin-image. The migration guide can be found here: https://www.gatsbyjs.com/docs/reference/release-notes/image-migration-guide/.
4:37:54 PM: npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
4:37:57 PM: npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
4:37:57 PM: npm WARN deprecated @hapi/joi@15.1.1: Switch to 'npm install joi'
4:37:57 PM: npm WARN deprecated eslint-loader@2.2.1: This loader has been deprecated. Please use eslint-webpack-plugin
4:38:00 PM: npm WARN deprecated tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
4:38:02 PM: npm WARN deprecated popper.js@1.16.1: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1
4:38:07 PM: npm WARN deprecated core-js@2.6.12: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
4:40:47 PM: npm ERR! code 1
4:40:47 PM: npm ERR! path /opt/build/repo/node_modules/node-sass
4:40:47 PM: npm ERR! command failed
4:40:47 PM: npm ERR! command sh -c node scripts/build.js
4:40:47 PM: npm ERR! Building: /opt/buildhome/.nvm/versions/node/v16.10.0/bin/node /opt/build/repo/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
4:40:47 PM: npm ERR! make: Entering directory '/opt/build/repo/node_modules/node-sass/build'
4:40:47 PM: npm ERR!   g++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DLIBSASS_VERSION="3.5.5"' -I/opt/buildhome/.node-gyp/16.10.0/include/node -I/opt/buildhome/.node-gyp/16.10.0/src -I/opt/buildhome/.node-gyp/16.10.0/deps/openssl/config -I/opt/buildhome/.node-gyp/16.10.0/deps/openssl/openssl/include -I/opt/buildhome/.node-gyp/16.10.0/deps/uv/include -I/opt/buildhome/.node-gyp/16.10.0/deps/zlib -I/opt/buildhome/.node-gyp/16.10.0/deps/v8/include -I../src/libsass/include  -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -fno-omit-frame-pointer -std=gnu++14 -std=c++0x -fexceptions -frtti -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/ast.o.d.raw   -c -o Release/obj.target/libsass/src/libsass/src/ast.o ../src/libsass/src/ast.cpp
4:40:47 PM: npm ERR!   g++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' ---

4:40:47 PM: npm ERR! gyp verb node dev dir /opt/buildhome/.node-gyp/16.10.0
4:40:47 PM: npm ERR! gyp verb `which` succeeded for `make` /usr/bin/make
4:40:47 PM: npm ERR! gyp info spawn make
4:40:47 PM: npm ERR! gyp info spawn args [ 'V=1', 'BUILDTYPE=Release', '-C', 'build' ]
4:40:47 PM: npm ERR! ../src/libsass/src/cencode.c: In function ‘base64_encode_block’:
4:40:47 PM: npm ERR! ../src/libsass/src/cencode.c:48:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
4:40:47 PM: npm ERR!    48 |    result = (fragment & 0x003) << 4;
4:40:47 PM: npm ERR!       |    ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
4:40:47 PM: npm ERR! ../src/libsass/src/cencode.c:52:2: note: here
4:40:47 PM: npm ERR!    52 |  case step_B:
4:40:47 PM: npm ERR!       |  ^~~~
4:40:47 PM: npm ERR! ../src/libsass/src/cencode.c:62:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
4:40:47 PM: npm ERR!    62 |    result = (fragment & 0x00f) << 2;
4:40:47 PM: npm ERR!       |    ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
4:40:47 PM: npm ERR! ../src/libsass/src/cencode.c:66:2: note: here
4:40:47 PM: npm ERR!    66 |  case step_C:
4:40:47 PM: npm ERR!       |  ^~~~
4:40:47 PM: npm ERR! ../src/libsass/src/functions.cpp: In function ‘void Sass::Functions::handle_utf8_error(const Sass::ParserState&, Sass::Backtraces)’:
4:40:47 PM: npm ERR! ../src/libsass/src/functions.cpp:110:20: warning: catching polymorphic type ‘class utf8::invalid_code_point’ by value [-Wcatch-value=]
4:40:47 PM: npm ERR!   110 |       catch (utf8::invalid_code_point) {
4:40:47 PM: npm ERR!       |                    ^~~~~~~~~~~~~~~~~~
4:40:47 PM: npm ERR! ../src/libsass/src/functions.cpp:114:20: warning: catching polymorphic type ‘class utf8::not_enough_room’ by value [-Wcatch-value=]
4:40:47 PM: npm ERR!   114 |       catch (utf8::not_enough_room) {
4:40:47 PM: npm ERR!       |                    ^~~~~~~~~~~~~~~
4:40:47 PM: npm ERR! ../src/libsass/src/functions.cpp:118:20: warning: catching polymorphic type ‘class utf8::invalid_utf8’ by value [-Wcatch-value=]
4:40:47 PM: npm ERR!   118 |       catch (utf8::invalid_utf8) {
4:40:47 PM: npm ERR!       |                    ^~~~~~~~~~~~
4:40:47 PM: npm ERR! ../src/libsass/src/json.cpp: In function ‘char* json_encode_string(const char*)’:
4:40:47 PM: npm ERR! ../src/libsass/src/json.cpp:405:15: warning: catching polymorphic type ‘class std::exception’ by value [-Wcatch-value=]
4:40:47 PM: npm ERR!   405 |   catch (std::exception) {
4:40:47 PM: npm ERR!       |               ^~~~~~~~~
4:40:47 PM: npm ERR! ../src/libsass/src/json.cpp: In function ‘char* json_stringify(const JsonNode*, const char*)’:
4:40:47 PM: npm ERR! ../src/libsass/src/json.cpp:424:15: warning: catching polymorphic type ‘class std::exception’ by value [-Wcatch-value=]
4:40:47 PM: npm ERR!   424 |   catch (std::exception) {
4:40:47 PM: npm ERR!       |               ^~~~~~~~~
4:40:47 PM: npm ERR! In file included from /opt/buildhome/.node-gyp/16.10.0/include/node/v8.h:30,
4:40:47 PM: npm ERR!                  from /opt/buildhome/.node-gyp/16.10.0/include/node/node.h:63,
4:40:47 PM: npm ERR!                  from ../../nan/nan.h:58,
4:40:47 PM: npm ERR!                  from ../src/binding.cpp:1:
4:40:47 PM: npm ERR! /opt/buildhome/.node-gyp/16.10.0/include/node/v8-internal.h: In function ‘void v8::internal::PerformCastCheck(T*)’:
4:40:47 PM: npm ERR! /opt/buildhome/.node-gyp/16.10.0/include/node/v8-internal.h:489:38: error: ‘remove_cv_t’ is not a member of ‘std’; did you mean ‘remove_cv’?
4:40:47 PM: npm ERR!   489 |             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
4:40:47 PM: npm ERR!       |                                      ^~~~~~~~~~~
4:40:47 PM: npm ERR!       |                                      remove_cv
4:40:47 PM: npm ERR! /opt/buildhome/.node-gyp/16.10.0/include/node/v8-internal.h:489:38: error: ‘remove_cv_t’ is not a member of ‘std’; did you mean ‘remove_cv’?
4:40:47 PM: npm ERR!   489 |             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
4:40:47 PM: npm ERR!       |                                      ^~~~~~~~~~~
4:40:47 PM: npm ERR!       |                                      remove_cv
4:40:47 PM: npm ERR! /opt/buildhome/.node-gyp/16.10.0/include/node/v8-internal.h:489:50: error: template argument 2 is invalid
4:40:47 PM: npm ERR!   489 |             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
4:40:47 PM: npm ERR!       |                                                  ^
4:40:47 PM: npm ERR! /opt/buildhome/.node-gyp/16.10.0/include/node/v8-internal.h:489:63: error: ‘::Perform’ has not been declared
4:40:47 PM: npm ERR!   489 |             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
4:40:47 PM: npm ERR!       |                                                               ^~~~~~~
4:40:47 PM: npm ERR! ../src/binding.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE render(Nan::NAN_METHOD_ARGS_TYPE)’:
4:40:47 PM: npm ERR! ../src/binding.cpp:284:98: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
4:40:47 PM: npm ERR!   284 |     int status = uv_queue_work(uv_default_loop(), &ctx_w->request, compile_it, (uv_after_work_cb)MakeCallback);
4:40:47 PM: npm ERR!       |                                                                                                  ^~~~~~~~~~~~
4:40:47 PM: npm ERR! ../src/binding.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE render_file(Nan::NAN_METHOD_ARGS_TYPE)’:
4:40:47 PM: npm ERR! ../src/binding.cpp:320:98: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
4:40:47 PM: npm ERR!   320 |     int status = uv_queue_work(uv_default_loop(), &ctx_w->request, compile_it, (uv_after_work_cb)MakeCallback);
4:40:47 PM: npm ERR!       |                                                                                                  ^~~~~~~~~~~~
4:40:47 PM: npm ERR! In file included from ../../nan/nan.h:58,
4:40:47 PM: npm ERR!                  from ../src/binding.cpp:1:
4:40:47 PM: npm ERR! ../src/binding.cpp: At global scope:
4:40:47 PM: npm ERR! /opt/buildhome/.node-gyp/16.10.0/include/node/node.h:821:43: warning: cast between incompatible function types from ‘void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’ {aka ‘void (*)(v8::Local<v8::Object>)’} to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
4:40:47 PM: npm ERR!   821 |       (node::addon_register_func) (regfunc),                          \
4:40:47 PM: npm ERR!       |                                           ^
4:40:47 PM: npm ERR! /opt/buildhome/.node-gyp/16.10.0/include/node/node.h:855:3: note: in expansion of macro ‘NODE_MODULE_X’
4:40:47 PM: npm ERR!   855 |   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
4:40:47 PM: npm ERR!       |   ^~~~~~~~~~~~~
4:40:47 PM: npm ERR! ../src/binding.cpp:358:1: note: in expansion of macro ‘NODE_MODULE’
4:40:47 PM: npm ERR!   358 | NODE_MODULE(binding, RegisterModule);
4:40:47 PM: npm ERR!       | ^~~~~~~~~~~
4:40:47 PM: npm ERR! make: *** [binding.target.mk:133: Release/obj.target/binding/src/binding.o] Error 1
4:40:47 PM: npm ERR! gyp ERR! build error
4:40:47 PM: npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
4:40:47 PM: npm ERR! gyp ERR! stack     at ChildProcess.onExit (/opt/build/repo/node_modules/node-gyp/lib/build.js:262:23)
4:40:47 PM: npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:390:28)
4:40:47 PM: npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
4:40:47 PM: npm ERR! gyp ERR! System Linux 4.19.167+
4:40:47 PM: npm ERR! gyp ERR! command "/opt/buildhome/.nvm/versions/node/v16.10.0/bin/node" "/opt/build/repo/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
4:40:47 PM: npm ERR! gyp ERR! cwd /opt/build/repo/node_modules/node-sass
4:40:47 PM: npm ERR! gyp ERR! node -v v16.10.0
4:40:47 PM: npm ERR! gyp ERR! node-gyp -v v3.8.0
4:40:47 PM: npm ERR! gyp ERR! not ok
4:40:47 PM: npm ERR! Build failed with error code: 1
4:40:47 PM: npm ERR! A complete log of this run can be found in:
4:40:47 PM: npm ERR!     /opt/buildhome/.npm/_logs/2021-10-02T11_10_47_404Z-debug.log
4:40:47 PM: Error during NPM install
4:40:47 PM: Build was terminated: Build script returned non-zero exit code: 1
4:40:47 PM: Failing build: Failed to build site
4:40:47 PM: Finished processing build request in 4m23.073982303s
  • List item

Hi @nikhil_no_1

In your package.json you have

"node-sass": "^4.14.1",

The version of node-sass you are using is incompatible with the version of Node (v16+) used in the build image (see compatibility list here.) You need to either upgrade the version of Node Sass you are using to v6.0+ (which may impact other dependencies in your project) or use NODE_VERSION environment variable to downgrade node to v14.17.6 which is compatible with the version of Node Sass you are currently using.

The above was originally post here for the same issue you have posted about.

1 Like

Awesome. Thanks for the quick response @coelmay. This resolved it.