Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed during stage 'building site': Build script returned non-zero exit code: 1 #13242

Closed
krityk opened this issue Apr 9, 2019 · 3 comments
Closed

Comments

@krityk
Copy link

krityk commented Apr 9, 2019

Description

Fail to host a gatsby site in netlify with gatsby build and npm run build.

Steps to reproduce

Build in netlify this repository : https://github.com/krityk/krityk.github.io

Expected result

Host in netlify

Actual result

here is the log on netlify :

10:52:00 AM: Build ready to start
10:52:02 AM: build-image version: 324ec043422499a87b63cac1f1dabeefe6dca19d
10:52:02 AM: build-image tag: v3.0.2
10:52:02 AM: buildbot version: ef2e26260c41679f4cdeaebbf93370345c9fecf7
10:52:02 AM: Fetching cached dependencies
10:52:03 AM: Failed to fetch cache, continuing with build
10:52:03 AM: Starting to prepare the repo for build
10:52:03 AM: No cached dependencies found. Cloning fresh repo
10:52:03 AM: git clone https://github.com/krityk/krityk.github.io
10:52:05 AM: Preparing Git Reference refs/heads/master
10:52:05 AM: Starting build script
10:52:05 AM: Installing dependencies
10:52:07 AM: v10.15.3 is already installed.
10:52:08 AM: Now using node v10.15.3 (npm v6.4.1)
10:52:09 AM: Attempting ruby version 2.6.2, read from environment
10:52:11 AM: Using ruby version 2.6.2
10:52:12 AM: Using PHP version 5.6
10:52:12 AM: Started restoring cached node modules
10:52:12 AM: Finished restoring cached node modules
10:52:12 AM: Started restoring cached yarn cache
10:52:12 AM: Finished restoring cached yarn cache
10:52:12 AM: Installing yarn at version 1.13.0
10:52:12 AM: Installing Yarn!
10:52:12 AM: > Downloading tarball...
10:52:12 AM: [1/2]: https://yarnpkg.com/downloads/1.13.0/yarn-v1.13.0.tar.gz --> /tmp/yarn.tar.gz.8626I4yoon
10:52:12 AM: % To
10:52:12 AM: tal % Received % Xferd Average Speed Time Time
10:52:12 AM: Time Current
10:52:12 AM: Dload Upload Total Spent
10:52:12 AM: Left Speed
10:52:12 AM:
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
10:52:12 AM:
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
10:52:12 AM:
100 93 100 93 0 0 301 0 --:--:-- --:--:--
10:52:12 AM: --:--:-- 300
10:52:13 AM:
100 609 0 609 0 0 796 0 --:--:-- --:--:-- --:--:-- 796
10:52:14 AM:
5 1142k 5 59738 0 0 36738 0 0:00:31 0:00:01 0:00:3
10:52:14 AM: 0 36738
10:52:14 AM:
100 1142k 100 1142k 0
10:52:14 AM: 0 665k 0 0:00:01 0:00:01 --:--:-- 11.7M
10:52:14 AM: [2/2]: https://yarnpkg.com/downloads/1.13.0/yarn-v1.13.0.tar.gz.asc -
10:52:14 AM: -> /tmp/yarn.tar.gz.8626I4yoon.asc
10:52:14 AM:
100 97 100 97 0 0 2686 0 --:--:-- --:--:-- --:--:-- 2686
10:52:14 AM:
100 613 0 613 0 0 2457 0 --:--:-- --:--:-- --:--:-- 2457
10:52:14 AM:
100 832 100 832 0 0 2079 0 --:--:-- --:--:-- --:--:--
10:52:14 AM: 2079
100 832 100 832 0 0 2079 0 --:--:-- --:--:-- --:--:-- 0
10:52:14 AM: > Verifying integrity...
10:52:15 AM: gpg: Signature made Tue 18 Dec 2018 04:04:55 PM UTC using RSA key ID B6FF4DE3
10:52:15 AM: gpg: Good signature from "Yarn Packaging yarn@dan.cx"
10:52:15 AM: gpg: Note: This key has expired!
10:52:15 AM: Primary key fingerprint: 72EC F46A 56B4 AD39 C907 BBB7 1646 B01B 86E5 0310
10:52:15 AM: Subkey fingerprint: E219 30C4 D0A4 AA46 1858 1F7A E074 D16E B6FF 4DE3
10:52:15 AM: > GPG signature looks good
10:52:15 AM: > Extracting to ~/.yarn...
10:52:15 AM: > Adding to $PATH...
10:52:15 AM: > We've added the following to your /opt/buildhome/.profile
10:52:15 AM: > If this isn't the profile of your current shell then please add the following to your correct profile:
10:52:15 AM: export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
10:52:15 AM:
10:52:16 AM: > Successfully installed Yarn 1.13.0! Please open another terminal where the yarn command will now be available.
10:52:17 AM: Installing NPM modules using Yarn version 1.13.0
10:52:18 AM: yarn install v1.13.0
10:52:18 AM: 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.
10:52:18 AM: [1/4] Resolving packages...
10:52:20 AM: [2/4] Fetching packages...
10:53:14 AM: info fsevents@1.2.4: The platform "linux" is incompatible with this module.
10:53:14 AM: info "fsevents@1.2.4" is an optional dependency and failed compatibility check. Excluding it from installation.
10:53:14 AM: [3/4] Linking dependencies...
10:53:14 AM: warning "gatsby > eslint-plugin-graphql@2.1.1" has incorrect peer dependency "graphql@^0.12.0 || ^0.13.0".
10:53:14 AM: warning "gatsby > express-graphql@0.6.12" has incorrect peer dependency "graphql@^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0".
10:53:14 AM: warning "gatsby > graphql-tools@3.1.1" has incorrect peer dependency "graphql@^0.13.0".
10:53:14 AM: warning " > gatsby-plugin-styled-components@3.0.5" has unmet peer dependency "babel-plugin-styled-components@>1.5.0".
10:53:14 AM: warning " > react-text-loop@2.0.1" has incorrect peer dependency "react@^15.0.1".
10:53:14 AM: warning " > react-text-loop@2.0.1" has incorrect peer dependency "react-dom@^15.0.1".
10:53:36 AM: [4/4] Building fresh packages...
10:53:44 AM: Done in 86.55s.
10:53:44 AM: NPM modules installed using Yarn
10:53:45 AM: Started restoring cached go cache
10:53:45 AM: Finished restoring cached go cache
10:53:45 AM: unset GOOS;
10:53:45 AM: unset GOARCH;
10:53:45 AM: export GOROOT='/opt/buildhome/.gimme/versions/go1.12.linux.amd64';
10:53:45 AM: export PATH="/opt/buildhome/.gimme/versions/go1.12.linux.amd64/bin:${PATH}";
10:53:45 AM: go version >&2;
10:53:45 AM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.12.linux.amd64.env';
10:53:45 AM: go version go1.12 linux/amd64
10:53:45 AM: Installing missing commands
10:53:45 AM: Verify run directory
10:53:45 AM: Executing user command: npm run build
10:53:46 AM: > gatsby-starter-mate@2.2.0 build /opt/build/repo
10:53:46 AM: > cleandir ./.cache && gatsby build
10:53:50 AM: error We encountered an error while trying to load your site's gatsby-config. Please fix the error and try again.
10:53:50 AM:
10:53:50 AM: TypeError: Expected parameter accessToken
10:53:50 AM:
10:53:50 AM: - contentful.node.js:7095 Module.createClient
10:53:50 AM: [repo]/[contentful]/dist/contentful.node.js:7095:11
10:53:50 AM:
10:53:50 AM: - gatsby-config.js:7 Object.
10:53:50 AM: /opt/build/repo/gatsby-config.js:7:27
10:53:50 AM:
10:53:50 AM: - v8-compile-cache.js:178 Module._compile
10:53:50 AM: [repo]/[v8-compile-cache]/v8-compile-cache.js:178:30
10:53:50 AM:
10:53:50 AM: - loader.js:712 Object.Module._extensions..js
10:53:50 AM: internal/modules/cjs/loader.js:712:10
10:53:50 AM:
10:53:50 AM: - loader.js:600 Module.load
10:53:50 AM: internal/modules/cjs/loader.js:600:32
10:53:50 AM:
10:53:50 AM: - loader.js:539 tryModuleLoad
10:53:50 AM: internal/modules/cjs/loader.js:539:12
10:53:50 AM:
10:53:50 AM: - loader.js:531 Function.Module._load
10:53:50 AM: internal/modules/cjs/loader.js:531:3
10:53:50 AM:
10:53:50 AM: - loader.js:637 Module.require
10:53:50 AM: internal/modules/cjs/loader.js:637:17
10:53:50 AM:
10:53:50 AM: - v8-compile-cache.js:159 require
10:53:50 AM: [repo]/[v8-compile-cache]/v8-compile-cache.js:159:20
10:53:50 AM:
10:53:54 AM: failed during stage 'building site': Build script returned non-zero exit code: 1
10:53:50 AM: - get-config-file.js:33
10:53:50 AM: [repo]/[gatsby]/dist/bootstrap/get-config-file.js:33:22
10:53:54 AM: Shutting down logging, 56 messages pending

Environment

Run gatsby info --clipboard in your project directory and paste the output here.

@lannonbr
Copy link
Contributor

lannonbr commented Apr 9, 2019

@krityk Are you storing the Access token for Contentful in Netlify? That is what seems to be the issue reading through that log.

@krityk
Copy link
Author

krityk commented Apr 10, 2019

@lannonbr thanx for the help it's fixed. I had to run the command SPACE_ID=xxxxx ACCESS_TOKEN=yyyyy yarn build on Netlify

@sidharthachatterjee
Copy link
Contributor

@krityk Glad to see that your issue is resolved!

Closing this out for now but please feel free to comment or reopen if we've missed anything!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants