Join the conversation

Sign in to join this conversation, and others like it, in the communities you care about.

React Static

A fast, lightweight, and powerful framework for building static-progressive React applications and websites.

React Static / General

Netlify build errors

Netlify build errors

React Static / General · November 8, 2018 at 8:31am

Apologies for the lengthy message, but this is my deploy log - seems to be saying yarn is not a command. Has anyone else run into this error? Preventing me from deploying site, and not sure how to fix!

KEY BITS:

6:20:08 PM: Executing user command: yarn build

6:20:08 PM: /usr/local/bin/build: line 32: yarn: command not found

6:20:08 PM: Error running command: Build script returned non-zero exit code: 127

6:20:08 PM: Failing build: Failed to build site

FULL LOG:

6:19:26 PM: Build ready to start

6:19:27 PM: build-image version: 42bca793ccd33055023c56c4ca8510463a56d317

6:19:28 PM: buildbot version: 3924ed076b0a333c42ff8c2dff3d88014c29564c

6:19:28 PM: Fetching cached dependencies

6:19:28 PM: Starting to download cache of 254.7KB

6:19:28 PM: Finished downloading cache in 107.396789ms

6:19:28 PM: Starting to extract cache

6:19:28 PM: Failed to fetch cache, continuing with build

6:19:28 PM: Starting to prepare the repo for build

6:19:28 PM: No cached dependencies found. Cloning fresh repo

6:19:28 PM: git clone git@github.com:AlcuinGuest/peach-social

6:19:30 PM: Preparing Git Reference refs/heads/master

6:19:30 PM: Found netlify.toml. Overriding site configuration

6:19:30 PM: Starting build script

6:19:30 PM: Installing dependencies

6:19:31 PM: Downloading and installing node v8.12.0...

6:19:31 PM: Downloading https://nodejs.org/dist/v8.12.0/node-v8.12.0-linux-x64.tar.xz...

6:19:32 PM: 1.4%

6:19:32 PM:

########################

6:19:32 PM: 34.0%

6:19:32 PM:

########################

6:19:32 PM: ###################################### 86.5%

6:19:32 PM:

######################################################################## 100.0%

6:19:32 PM: Computing checksum with sha256sum

6:19:32 PM: Checksums matched!

6:19:34 PM: Now using node v8.12.0 (npm v6.4.1)

6:19:34 PM: Attempting ruby version 2.3.6, read from environment

6:19:36 PM: Using ruby version 2.3.6

6:19:36 PM: Using PHP version 5.6

6:19:36 PM: Started restoring cached node modules

6:19:36 PM: Finished restoring cached node modules

6:19:36 PM: Installing NPM modules using NPM version 6.4.1

6:20:03 PM: > preact@8.3.1 postinstall /opt/build/repo/node_modules/preact

6:20:03 PM: > node -e "console.log('\u001b[35m\u001b[1mLove Preact? You can now donate to our open collective:\u001b[22m\u001b[39m\n > \u001b[34mhttps://opencollective.com/preact/donate\u001b[0m')"

6:20:03 PM: Love Preact? You can now donate to our open collective:

6:20:03 PM: > https://opencollective.com/preact/donate

6:20:04 PM: > uglifyjs-webpack-plugin@0.4.6 postinstall /opt/build/repo/node_modules/uglifyjs-webpack-plugin

6:20:04 PM: > node lib/post_install.js

6:20:04 PM: > styled-components@3.4.10 postinstall /opt/build/repo/node_modules/styled-components

6:20:04 PM: > node ./scripts/postinstall.js || exit 0

6:20:04 PM: Use styled-components at work? Consider supporting our development efforts at opencollective.com/styled-components

6:20:07 PM: npm WARN

6:20:07 PM: react-static-example-basic@1.0.1 No repository field.

6:20:07 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):

6:20:07 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

6:20:07 PM: added 1603 packages from 913 contributors and audited 13366 packages in 30.336s

6:20:07 PM: found 0 vulnerabilities

6:20:07 PM: NPM modules installed

6:20:07 PM: Started restoring cached go cache

6:20:07 PM: Finished restoring cached go cache

6:20:07 PM: unset GOOS;

6:20:07 PM: unset GOARCH;

6:20:07 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.10.linux.amd64';

6:20:07 PM: export PATH="/opt/buildhome/.gimme/versions/go1.10.linux.amd64/bin:${PATH}";

6:20:08 PM: go version >&2;

6:20:08 PM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.10.linux.amd64.env';

6:20:08 PM: go version go1.10 linux/amd64

6:20:08 PM: Installing missing commands

6:20:08 PM: Verify run directory

6:20:08 PM: Executing user command: yarn build

6:20:08 PM: /usr/local/bin/build: line 32: yarn: command not found

6:20:08 PM: Caching artifacts

6:20:08 PM: Started saving node modules

6:20:08 PM: Finished saving node modules

6:20:08 PM: Started saving pip cache

6:20:08 PM: Finished saving pip cache

6:20:08 PM: Started saving emacs cask dependencies

6:20:08 PM: Finished saving emacs cask dependencies

6:20:08 PM: Started saving maven dependencies

6:20:08 PM: Finished saving maven dependencies

6:20:08 PM: Started saving boot dependencies

6:20:08 PM: Finished saving boot dependencies

6:20:08 PM: Started saving go dependencies

6:20:08 PM: Finished saving go dependencies

6:20:08 PM: Cached node version v8.12.0

6:20:08 PM: Error running command: Build script returned non-zero exit code: 127

6:20:08 PM: Failing build: Failed to build site

6:20:08 PM: failed during stage 'building site': Build script returned non-zero exit code: 127

6:20:08 PM: Finished processing build request in 40.570970757s


November 8, 2018 at 2:38pm

You should probably ask Netlify and make sure to read the docs! https://www.netlify.com/docs/build-settings/

  • reply
  • like

What's in your package.json? What's your netlify build command?

Edited
  • reply
  • like

Try to use clear chache checkbox, if it doesn't help - please write an email to support@netlify.com and mention your domain name

  • reply
  • like

try to change build command to npm run build

  • reply
  • like

but for that you better have package-lock.json committed in your branch

  • reply
  • like

Thanks @fschroiff @justfly1984. No changes from the regular react static setup. I think it might be down to a new npm module i installed, as that's the only thing I really changed from a time when the deploy was working. If anyone has has this specific error before I would love to hear!

  • reply
  • like

November 9, 2018 at 6:50pm

I don't use yarn generally, so I hadn't encounter this issue.

  • reply
  • like

November 25, 2018 at 12:32pm

Fixed by starting a new project and copying all the code over.

  • reply
  • like