New CI=true build configuration, "Treating warnings as errors because process.env.CI = true"

Sorry to hear it @JeremyPittard! Could you share a link to your build logs in our UI, and also quote your netlify.toml for us? Our staff (and other customers who want to help) can’t see into your repos, generally speaking, so more info from you will be very helpful in debugging.

thanks, no worries
this is the most recent build log
https://app.netlify.com/sites/wafc/deploys/5ef215c7c1de600007358dcd

and the following is the entire netlify.toml file

[build]
  publish = "public"
  command = "CI= npm run build"
  functions = "lambda"
[build.environment]
  YARN_VERSION = "1.9.4"
  YARN_FLAGS = "--no-ignore-optional"

This broke my app. I then went and did the recommended fix and set the build command to CI= npm run build in settings. That solved my problem and I was able to deploy my app again.

Now, a couple days later, I’m getting an error again:

┌─────────────────────────────┐
8:16:52 PM: │ “build.command” failed │
8:16:52 PM: └─────────────────────────────┘
8:16:52 PM: ​
8:16:52 PM: Error message
8:16:52 PM: Command failed with exit code 1: CI= npm run build
8:16:52 PM: ​
8:16:52 PM: Error location
8:16:52 PM: In Build command from settings:
8:16:52 PM: CI= npm run build
8:16:52 PM: ​
8:16:52 PM: Resolved config
8:16:52 PM: build:
8:16:52 PM: command: CI= npm run build
8:16:52 PM: publish: /opt/build/repo/build

How do I fix this? CI= npm run build is still set in the settings but now I’m getting another error after this previously worked.

I just removed my .lock files and it now seems to work, thanks for reaching out though @fool

@nicknyr not sure, but this might also help your case

Hi, @nicknyr. The build command itself returned an error code.

The reason for the error will be in the logs above. It is unlikely that the current “exit code 1” is related to “CI= ” being used. The only way to tell though is for us to look at the full logs.

Would you please send us the deploy id where this happened? You can get the deploy id from the end of the page URL. For example for this deploy log URL:

https://app.netlify.com/sites/example/deploys/5ef40e69238887b256bc5758

The deploy id is 5ef40e69238887b256bc5758.

Or you can just send us the full URL if you prefer. If you do, we’ll take a look and let you know what we find.

I’ve seen a few other threads where I could post this, but I thought I’d post my question on this one.

I continue to have the following issue:
9:32:11 AM: Build ready to start
9:32:13 AM: build-image version: 3031d4c9e432fd7016f6279fc9ad706f9205d845
9:32:13 AM: build-image tag: v3.3.17
9:32:13 AM: buildbot version: 1f35b3abd6e2bf5230d8edf68072840fdec1513f
9:32:14 AM: Fetching cached dependencies
9:32:14 AM: Starting to download cache of 757.7KB
9:32:14 AM: Finished downloading cache in 103.702521ms
9:32:14 AM: Starting to extract cache
9:32:14 AM: Finished extracting cache in 30.887806ms
9:32:14 AM: Finished fetching cache in 135.904581ms
9:32:14 AM: Starting to prepare the repo for build
9:32:14 AM: Preparing Git Reference refs/heads/master
9:32:16 AM: Different publish path detected, going to use the one specified in the Netlify configuration file: ‘build’ versus ‘build/’ in the Netlify UI
9:32:16 AM: Starting build script
9:32:16 AM: Installing dependencies
9:32:16 AM: Python version set to 2.7
9:32:17 AM: v12.18.0 is already installed.
9:32:18 AM: Now using node v12.18.0 (npm v6.14.4)
9:32:18 AM: Started restoring cached build plugins
9:32:18 AM: Finished restoring cached build plugins
9:32:18 AM: Attempting ruby version 2.7.1, read from environment
9:32:21 AM: Using ruby version 2.7.1
9:32:21 AM: Using PHP version 5.6
9:32:21 AM: 5.2 is already installed.
9:32:21 AM: Using Swift version 5.2
9:32:21 AM: Started restoring cached go cache
9:32:21 AM: Finished restoring cached go cache
9:32:22 AM: go version go1.14.4 linux/amd64
9:32:22 AM: go version go1.14.4 linux/amd64
9:32:22 AM: Installing missing commands
9:32:22 AM: Verify run directory
9:32:23 AM: ​
9:32:23 AM: ┌─────────────────────────────┐
9:32:23 AM: │ Netlify Build │
9:32:23 AM: └─────────────────────────────┘
9:32:23 AM: ​
9:32:23 AM: ❯ Version
9:32:23 AM: @netlify/build 2.0.10
9:32:23 AM: ​
9:32:23 AM: ❯ Flags
9:32:23 AM: deployId: 5ef4c37b8f607b00076f4d27
9:32:23 AM: mode: buildbot
9:32:23 AM: ​
9:32:23 AM: ❯ Current directory
9:32:23 AM: /opt/build/repo
9:32:23 AM: ​
9:32:23 AM: ❯ Config file
9:32:23 AM: No config file was defined: using default values.
9:32:23 AM: ​
9:32:23 AM: ❯ Context
9:32:23 AM: production
9:32:23 AM: ​
9:32:23 AM: ┌────────────────────────────────┐
9:32:23 AM: │ 1. Build command from settings │
9:32:23 AM: └────────────────────────────────┘
9:32:23 AM: ​
9:32:23 AM: $ CI= npm run build
9:32:23 AM: npm ERR! code ENOENT
9:32:23 AM: npm ERR! syscall open
9:32:23 AM: npm ERR! path /opt/build/repo/package.json
9:32:23 AM: npm ERR! errno -2
9:32:23 AM: npm ERR! enoent ENOENT: no such file or directory, open ‘/opt/build/repo/package.json’
9:32:23 AM: npm ERR! enoent This is related to npm not being able to find a file.
9:32:23 AM: npm ERR! enoent
9:32:23 AM: npm ERR! A complete log of this run can be found in:
9:32:23 AM: npm ERR! /opt/buildhome/.npm/_logs/2020-06-25T15_32_23_804Z-debug.log
9:32:23 AM: ​
9:32:23 AM: ┌─────────────────────────────┐
9:32:23 AM: │ “build.command” failed │
9:32:23 AM: └─────────────────────────────┘
9:32:23 AM: ​
9:32:23 AM: Error message
9:32:23 AM: Command failed with exit code 254: CI= npm run build
9:32:23 AM: ​
9:32:23 AM: Error location
9:32:23 AM: In Build command from settings:
9:32:23 AM: CI= npm run build
9:32:23 AM: ​
9:32:23 AM: Resolved config
9:32:23 AM: build:
9:32:23 AM: command: CI= npm run build
9:32:23 AM: publish: /opt/build/repo/build
9:32:23 AM: Caching artifacts
9:32:23 AM: Started saving build plugins
9:32:23 AM: Finished saving build plugins
9:32:23 AM: Started saving pip cache
9:32:30 AM: Finished saving pip cache
9:32:30 AM: Started saving emacs cask dependencies
9:32:30 AM: Finished saving emacs cask dependencies
9:32:30 AM: Started saving maven dependencies
9:32:30 AM: Finished saving maven dependencies
9:32:30 AM: Started saving boot dependencies
9:32:30 AM: Finished saving boot dependencies
9:32:30 AM: Started saving go dependencies
9:32:31 AM: Finished saving go dependencies
9:32:33 AM: Error running command: Build script returned non-zero exit code: 1
9:32:33 AM: Failing build: Failed to build site
9:32:33 AM: Failed during stage ‘building site’: Build script returned non-zero exit code: 1
9:32:34 AM: Finished processing build request in 20.111730723s

I’ve tried utilizing a toml file with various commands I’ve found online. I’ve also tried using next-on-netlify npm. Whatever configuration I use though, I continue to see the same error above, with the exception of build command changing with whatever command I try and use. Any help would be appreciated.

The github repository can be located here: https://github.com/elchaparrito1/PFN/tree/master/pfn

I get the same error as @elchaparrito1 when I have CI= in my netlify.toml build command. To get around it I tried building locally but local builds don’t work with this in the toml so I have just removed it from the netlify.toml, disabled CI building on the netlify servers, and I just build and deploy from the CLI now on my PC. I would like to get back to automatic build and deploys from GitHub but I couldn’t get it working either.

CI= yarn build command is not working for me. Please let me know if you have any solution for this.

Hiya @rob @rajhanskumarseo and @elchaparrito1 ! Sorry to hear about the trouble.

Please link us to deploys where you are having trouble so we can take a look.

@elchaparrito1 your problem is different than the topic of this thread:

9:32:23 AM: npm ERR! path /opt/build/repo/package.json    

…which makes me think you cannot build locally either - npm doesn’t work without a package.json and this error says there is no package.json. Looking at your repo, I think you need to set a “base” directory of “pfn”, since this is where your package.json is.

Hey @fool , look at below added logs.

12:30:15 AM: Build ready to start
12:30:17 AM: build-image version: 3031d4c9e432fd7016f6279fc9ad706f9205d845
12:30:17 AM: build-image tag: v3.3.17
12:30:17 AM: buildbot version: 1f35b3abd6e2bf5230d8edf68072840fdec1513f
12:30:17 AM: Fetching cached dependencies
12:30:18 AM: Starting to download cache of 250.9MB
12:30:30 AM: Finished downloading cache in 12.222311333s
12:30:30 AM: Starting to extract cache
12:30:41 AM: Finished extracting cache in 11.501110472s
12:30:41 AM: Finished fetching cache in 23.780886183s
12:30:41 AM: Starting to prepare the repo for build
12:30:42 AM: Preparing Git Reference refs/heads/master
12:30:44 AM: Different publish path detected, going to use the one specified in the Netlify configuration file: ‘build’ versus ‘build/’ in the Netlify UI
12:30:44 AM: Starting build script
12:30:44 AM: Installing dependencies
12:30:44 AM: Python version set to 2.7
12:30:44 AM: Started restoring cached node version
12:30:50 AM: Finished restoring cached node version
12:30:51 AM: v10.21.0 is already installed.
12:30:51 AM: Now using node v10.21.0 (npm v6.14.4)
12:30:51 AM: Started restoring cached build plugins
12:30:51 AM: Finished restoring cached build plugins
12:30:52 AM: Attempting ruby version 2.6.2, read from environment
12:30:53 AM: Using ruby version 2.6.2
12:30:53 AM: Using PHP version 5.6
12:30:53 AM: 5.2 is already installed.
12:30:53 AM: Using Swift version 5.2
12:30:53 AM: Started restoring cached node modules
12:30:53 AM: Finished restoring cached node modules
12:30:53 AM: Installing NPM modules using NPM version 6.14.4
12:31:00 AM: 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
12:31:01 AM: npm WARN deprecated core-js@1.2.7: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
12:31:26 AM: npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
12:31:27 AM: npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
12:31:27 AM: npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
12:31:37 AM: npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
12:31:37 AM: npm WARN deprecated left-pad@1.3.0: use String.prototype.padStart()
12:31:49 AM: npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
12:31:59 AM: npm WARN deprecated core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
12:32:24 AM: npm WARN rm not removing /opt/build/repo/node_modules/.bin/jest as it wasn’t installed by /opt/build/repo/node_modules/jestnpm WARN rm not removing /opt/build/repo/node_modules/.bin/rimraf as it wasn’t installed by /opt/build/repo/node_modules/rimrafnpm WARN rm not removing /opt/build/repo/node_modules/.bin/semver as it wasn’t installed by /opt/build/repo/node_modules/semvernpm WARN rm not removing /opt/build/repo/node_modules/.bin/json5 as it wasn’t installed by /opt/build/repo/node_modules/json5
12:32:24 AM: > core-js@2.6.11 postinstall /opt/build/repo/node_modules/babel-runtime/node_modules/core-js
12:32:24 AM: > node -e “try{require(’./postinstall’)}catch(e){}”
12:32:24 AM: > core-js@3.6.5 postinstall /opt/build/repo/node_modules/react-app-polyfill/node_modules/core-js
12:32:24 AM: > node -e “try{require(’./postinstall’)}catch(e){}”
12:32:26 AM: npm notice created a lockfile as package-lock.json. You should commit this file.
12:32:26 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.0.7 (node_modules/react-scripts/node_modules/fsevents):
12:32:26 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.0.7: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
12:32:26 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/jest-haste-map/node_modules/fsevents):
12:32:26 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
12:32:26 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/chokidar/node_modules/fsevents):
12:32:26 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
12:32:26 AM: npm WARN notsup Unsupported engine for watchpack-chokidar2@2.0.0: wanted: {“node”:"<8.10.0"} (current: {“node”:“10.21.0”,“npm”:“6.14.4”})
12:32:26 AM: npm WARN notsup Not compatible with your version of node/npm: watchpack-chokidar2@2.0.0
12:32:26 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/watchpack/node_modules/chokidar/node_modules/fsevents):
12:32:26 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
12:32:26 AM: npm WARN bootstrap@4.4.1 requires a peer of jquery@1.9.1 - 3 but none is installed. You must install peer dependencies yourself.
12:32:26 AM: npm WARN react-radio-button-group@1.2.8 requires a peer of react@^15.4.1 but none is installed. You must install peer dependencies yourself.
12:32:26 AM: npm WARN tsutils@3.17.1 requires a peer of 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 but none is installed. You must install peer dependencies yourself.
12:32:26 AM: added 281 packages from 177 contributors, removed 260 packages, updated 1338 packages and audited 1623 packages in 91.526s
12:32:27 AM: 47 packages are looking for funding
12:32:27 AM: run npm fund for details
12:32:27 AM: found 3 vulnerabilities (1 low, 2 moderate)
12:32:27 AM: run npm audit fix to fix them, or npm audit for details
12:32:27 AM: NPM modules installed
12:32:28 AM: Started restoring cached go cache
12:32:28 AM: Finished restoring cached go cache
12:32:28 AM: Installing Go version 1.12
12:32:33 AM: unset GOOS;
12:32:33 AM: unset GOARCH;
12:32:33 AM: export GOROOT=’/opt/buildhome/.gimme_cache/versions/go1.12.linux.amd64’;
12:32:33 AM: export PATH="/opt/buildhome/.gimme_cache/versions/go1.12.linux.amd64/bin:{PATH}"; 12:32:33 AM: go version >&2; 12:32:33 AM: export GIMME_ENV="/opt/buildhome/.gimme_cache/env/go1.12.linux.amd64.env" 12:32:33 AM: go version go1.12 linux/amd64 12:32:33 AM: Installing missing commands 12:32:33 AM: Verify run directory 12:32:34 AM: ​ 12:32:34 AM: ┌─────────────────────────────┐ 12:32:34 AM: │ Netlify Build │ 12:32:34 AM: └─────────────────────────────┘ 12:32:34 AM: ​ 12:32:34 AM: ❯ Version 12:32:34 AM: @netlify/build 2.0.10 12:32:34 AM: ​ 12:32:34 AM: ❯ Flags 12:32:34 AM: deployId: 5ef645bff14c750007b37094 12:32:34 AM: mode: buildbot 12:32:34 AM: ​ 12:32:34 AM: ❯ Current directory 12:32:34 AM: /opt/build/repo 12:32:34 AM: ​ 12:32:34 AM: ❯ Config file 12:32:34 AM: No config file was defined: using default values. 12:32:34 AM: ​ 12:32:34 AM: ❯ Context 12:32:34 AM: production 12:32:34 AM: ​ 12:32:34 AM: ┌────────────────────────────────┐ 12:32:34 AM: │ 1. Build command from settings │ 12:32:34 AM: └────────────────────────────────┘ 12:32:34 AM: ​ 12:32:34 AM: CI= yarn build
12:32:34 AM: bash: yarn: command not found
12:32:34 AM: ​
12:32:34 AM: ┌─────────────────────────────┐
12:32:34 AM: │ “build.command” failed │
12:32:34 AM: └─────────────────────────────┘
12:32:34 AM: ​
12:32:34 AM: Error message
12:32:34 AM: Command failed with exit code 127: CI= yarn build
12:32:34 AM: ​
12:32:34 AM: Error location
12:32:34 AM: In Build command from settings:
12:32:34 AM: CI= yarn build
12:32:34 AM: ​
12:32:34 AM: Resolved config
12:32:34 AM: build:
12:32:34 AM: command: CI= yarn build
12:32:34 AM: publish: /opt/build/repo/build
12:32:34 AM: Caching artifacts
12:32:34 AM: Started saving node modules
12:32:34 AM: Finished saving node modules
12:32:34 AM: Started saving build plugins
12:32:34 AM: Finished saving build plugins
12:32:34 AM: Started saving pip cache
12:32:41 AM: Finished saving pip cache
12:32:41 AM: Started saving emacs cask dependencies
12:32:41 AM: Finished saving emacs cask dependencies
12:32:41 AM: Started saving maven dependencies
12:32:41 AM: Finished saving maven dependencies
12:32:41 AM: Started saving boot dependencies
12:32:41 AM: Finished saving boot dependencies
12:32:41 AM: Started saving go dependencies
12:32:43 AM: Finished saving go dependencies
12:32:43 AM: Error running command: Build script returned non-zero exit code: 1
12:32:43 AM: Failing build: Failed to build site
12:32:43 AM: Failed during stage ‘building site’: Build script returned non-zero exit code: 1
12:32:43 AM: Finished processing build request in 2m25.996062862s

Thanks @fool. I got so far into the weeds of the issue, I didn’t look closely at the error pertaining to the file structure.

Here’s the problem:

We do not install yarn for you unless:

  • there is a yarn.lock file in the root of the repo (xor in your base directory, if set!)
  • you have a yarn dependency in package.json which is in the root of your repo (xor your base directory, if set).

Adding CI= npm run build does not work for me. Also tried with the empty env variable. Anyone using vue-cli with the same issue? Thanks!

8:03:12 PM: > vue-cli-service build 8:03:13 PM: - Building for production... 8:03:17 PM: ERROR Failed to compile with 1 errors6:03:17 PM 8:03:17 PM: error in ./src/main.js 8:03:17 PM: Module build failed (from ./node_modules/thread-loader/dist/cjs.js): 8:03:17 PM: Thread Loader (Worker 0) 8:03:17 PM: [BABEL] /opt/build/repo/src/main.js: Cannot find module '@babel/compat-data/corejs3-shipped-proposals'

Hi, @dbarcosb, I see that error in the site builds but it doesn’t appear to be related to CI=true in any way.

The error appears similar to this:

I would recommend testing that solution, quoting:

For those babel users who are affected by this issue after upgrading to node.js 13.13/12.17, please upgrade @babel/preset-env to 7.9.0.

Please let us know if it works (or not) and/or if there are other questions.

1 Like

Hi @luke, thanks for your answer! I am editing my first reply because this actually worked, the problem was there. Investigated with other threads and finally it worked, thanks!

I’m still getting an error even after editing my build command settings

3:04:08 PM: Build ready to start
3:04:09 PM: build-image version: ca811f47d4c1cbd1812d1eb6ecb0c977e86d1a1d
3:04:09 PM: build-image tag: v3.3.20
3:04:09 PM: buildbot version: 78b5536ab4f742c26705d3e953381b9cde6e22ef
3:04:10 PM: Fetching cached dependencies
3:04:10 PM: Failed to fetch cache, continuing with build
3:04:10 PM: Starting to prepare the repo for build
3:04:10 PM: No cached dependencies found. Cloning fresh repo
3:04:10 PM: git clone https://github.com/tattooseoul/ouitresjolie_1
3:04:11 PM: Preparing Git Reference refs/heads/master
3:04:12 PM: Starting build script
3:04:12 PM: Installing dependencies
3:04:12 PM: Python version set to 2.7
3:04:13 PM: v12.18.0 is already installed.
3:04:14 PM: Now using node v12.18.0 (npm v6.14.4)
3:04:14 PM: Started restoring cached build plugins
3:04:14 PM: Finished restoring cached build plugins
3:04:14 PM: Attempting ruby version 2.7.1, read from environment
3:04:16 PM: Using ruby version 2.7.1
3:04:16 PM: Using PHP version 5.6
3:04:16 PM: 5.2 is already installed.
3:04:16 PM: Using Swift version 5.2
3:04:16 PM: Started restoring cached node modules
3:04:16 PM: Finished restoring cached node modules
3:04:16 PM: Started restoring cached yarn cache
3:04:16 PM: Finished restoring cached yarn cache
3:04:16 PM: Installing yarn at version 1.22.4
3:04:16 PM: Installing Yarn!
3:04:16 PM: > Downloading tarball…
3:04:16 PM: [1/2]: https://yarnpkg.com/downloads/1.22.4/yarn-v1.22.4.tar.gz --> /tmp/yarn.tar.gz.JaBDhdIiX0
3:04:16 PM: % Total % Received % Xferd Average Speed Time Time Time Current
3:04:16 PM: Dload Upload Total Spent Left Speed
3:04:16 PM: 0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0
3:04:16 PM: 100 80 100 80 0 0 287 0 --:–:-- --:–:-- --:–:-- 287
3:04:17 PM: 0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0
3:04:17 PM: 100 93 100 93 0 0 155 0 --:–:-- --:–:-- --:–:-- 577
3:04:17 PM: 100 630 100 630 0 0 710 0 --:–:-- --:–:-- --:–:-- 710
3:04:17 PM: 100 1215k 100 1215k 0 0 928k 0 0:00:01 0:00:01 --:–:-- 928k
3:04:17 PM: [2/2]: https://yarnpkg.com/downloads/1.22.4/yarn-v1.22.4.tar.gz.asc --> /tmp/yarn.tar.gz.JaBDhdIiX0.asc
3:04:17 PM: 100 84 100 84 0 0 3108 0 --:–:-- --:–:-- --:–:-- 3108
3:04:17 PM: 100 97 100 97 0 0 1786 0 --:–:-- --:–:-- --:–:-- 1786
3:04:17 PM: 100 634 100 634 0 0 7313 0 --:–:-- --:–:-- --:–:-- 7313
3:04:17 PM: 0 1028 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0
3:04:17 PM: 100 1028 100 1028 0 0 8042 0 --:–:-- --:–:-- --:–:-- 1003k
3:04:18 PM: > Verifying integrity…
3:04:18 PM: gpg: Signature made Mon 09 Mar 2020 03:52:13 PM UTC using RSA key ID
3:04:18 PM: gpg: Good signature from “Yarn Packaging yarn@dan.cx
3:04:18 PM: gpg: WARNING: This key is not certified with a trusted signature!
3:04:18 PM: gpg: There is no indication that the signature belongs to the owner.
3:04:18 PM: Primary key fingerprint:
3:04:18 PM:
3:04:18 PM: > GPG signature looks good
3:04:18 PM: > Extracting to ~/.yarn…
3:04:18 PM: > Adding to PATH... 3:04:18 PM: > Successfully installed Yarn 1.22.4! Please open another terminal where the `yarn` command will now be available. 3:04:18 PM: Installing NPM modules using Yarn version 1.22.4 3:04:19 PM: yarn install v1.22.4 3:04:19 PM: 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. 3:04:19 PM: [1/4] Resolving packages... 3:04:20 PM: warning @gridsome/vue-remark > @gridsome/source-filesystem > chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. 3:04:20 PM: warning @gridsome/vue-remark > @gridsome/transformer-remark > unified > @types/vfile > @types/vfile-message@2.0.0: This is a stub types definition. vfile-message provides its own type definitions, so you do not need this installed. 3:04:24 PM: [2/4] Fetching packages... 3:04:24 PM: warning Pattern ["vscode-textmate@https://github.com/octref/vscode-textmate"] is trying to unpack in the same destination "/opt/build/.yarn_cache/v6/npm-vscode-textmate-4.0.1-e65aabe2227febda7beaad31dd0fca1228c5ddf3/node_modules/vscode-textmate" as pattern ["vscode-textmate@git+https://github.com/octref/vscode-textmate.git"]. This could result in non-deterministic behavior, skipping. 3:04:30 PM: warning mini-css-extract-plugin@0.5.0: Invalid bin field for "mini-css-extract-plugin". 3:04:30 PM: warning url-loader@1.1.2: Invalid bin field for "url-loader". 3:04:40 PM: info fsevents@1.2.13: The platform "linux" is incompatible with this module. 3:04:40 PM: info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation. 3:04:40 PM: info fsevents@2.1.3: The platform "linux" is incompatible with this module. 3:04:40 PM: info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation. 3:04:40 PM: [3/4] Linking dependencies... 3:04:40 PM: warning "gridsome-plugin-remark-shiki > shiki > onigasm > tslint@5.20.1" has unmet peer dependency "typescript@>=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev". 3:04:40 PM: warning "gridsome-plugin-remark-shiki > shiki > onigasm > tslint > tsutils@2.29.0" has unmet peer dependency "typescript@>=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >= 3.0.0-dev || >= 3.1.0-dev". 3:04:40 PM: warning "gridsome-plugin-remark-shiki > shiki-languages > vscode-textmate@4.0.1" has unmet peer dependency "oniguruma@^7.0.0". 3:04:40 PM: warning "gridsome-plugin-remark-shiki > shiki-languages > vscode-textmate@4.0.1" has unmet peer dependency "onigasm@^2.1.0". 3:04:40 PM: warning "gridsome-plugin-remark-shiki > shiki > shiki-themes > vscode-textmate@4.0.1" has unmet peer dependency "oniguruma@^7.0.0". 3:04:40 PM: warning " > vue-fuse@2.2.1" has unmet peer dependency "vue@^2.6.10". 3:04:47 PM: [4/4] Building fresh packages... 3:04:50 PM: success Saved lockfile. 3:04:50 PM: Done in 31.27s. 3:04:50 PM: NPM modules installed using Yarn 3:04:51 PM: Started restoring cached go cache 3:04:51 PM: Finished restoring cached go cache 3:04:51 PM: go version go1.14.4 linux/amd64 3:04:51 PM: go version go1.14.4 linux/amd64 3:04:51 PM: Installing missing commands 3:04:51 PM: Verify run directory 3:04:52 PM: ​ 3:04:52 PM: ┌─────────────────────────────┐ 3:04:52 PM: │ Netlify Build │ 3:04:52 PM: └─────────────────────────────┘ 3:04:52 PM: ​ 3:04:52 PM: ❯ Version 3:04:52 PM: @netlify/build 2.0.27 3:04:52 PM: ​ 3:04:52 PM: ❯ Flags 3:04:52 PM: deployId: 5f1050476066b00009a7a632 3:04:52 PM: mode: buildbot 3:04:52 PM: ​ 3:04:52 PM: ❯ Current directory 3:04:52 PM: /opt/build/repo 3:04:52 PM: ​ 3:04:52 PM: ❯ Config file 3:04:52 PM: /opt/build/repo/netlify.toml 3:04:52 PM: ​ 3:04:52 PM: ❯ Context 3:04:52 PM: production 3:04:52 PM: ​ 3:04:52 PM: ┌────────────────────────────────────┐ 3:04:52 PM: │ 1. build.command from netlify.toml │ 3:04:52 PM: └────────────────────────────────────┘ 3:04:52 PM: ​ 3:04:52 PM: CI= npm run build
3:04:52 PM: > base@ build /opt/build/repo
3:04:52 PM: > gridsome build
3:04:53 PM: Gridsome v0.7.19
3:04:53 PM: Initializing plugins…
3:04:54 PM: Load sources - 0.02s
3:04:54 PM: Create GraphQL schema - 0.06s
3:04:54 PM: Create pages and templates - 0.02s
3:04:54 PM: Generate temporary code - 0.03s
3:04:54 PM: Bootstrap finish - 1.37s
3:04:54 PM: Compiling assets…
3:05:08 PM: Compile assets - 14.13s
3:05:08 PM: Execute GraphQL (3 queries) - 0s
3:05:08 PM: Render HTML (3 files) - 0.29s
3:05:08 PM: Process files (0 files) - 0s
3:05:09 PM: Processing images (9 images) - 0%Processing images (9 images) - 100%Process images (9 images) - 0.96s
3:05:09 PM: Error: Sitemap plugin is missing a required siteUrl config.
3:05:09 PM: at /opt/build/repo/node_modules/@gridsome/plugin-sitemap/index.js:15:13
3:05:09 PM: at Plugins.run (/opt/build/repo/node_modules/gridsome/lib/app/Plugins.js:141:17)
3:05:09 PM: at async module.exports (/opt/build/repo/node_modules/gridsome/lib/build.js:42:3)
3:05:10 PM: npm ERR! code ELIFECYCLE
3:05:10 PM: npm ERR! errno 1
3:05:10 PM: npm ERR! base@ build: gridsome build
3:05:10 PM: npm ERR! Exit status 1
3:05:10 PM: npm ERR!
3:05:10 PM: npm ERR! Failed at the base@ build script.
3:05:10 PM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
3:05:10 PM: npm ERR! A complete log of this run can be found in:
3:05:10 PM: npm ERR! /opt/buildhome/.npm/_logs/2020-07-16T13_05_10_513Z-debug.log
3:05:10 PM: ​
3:05:10 PM: ┌─────────────────────────────┐
3:05:10 PM: │ “build.command” failed │
3:05:10 PM: └─────────────────────────────┘
3:05:10 PM: ​
3:05:10 PM: Error message
3:05:10 PM: Command failed with exit code 1: CI= npm run build
3:05:10 PM: ​
3:05:10 PM: Error location
3:05:10 PM: In build.command from netlify.toml:
3:05:10 PM: CI= npm run build
3:05:10 PM: ​
3:05:10 PM: Resolved config
3:05:10 PM: build:
3:05:10 PM: command: CI= npm run build
3:05:10 PM: commandOrigin: config
3:05:10 PM: publish: /opt/build/repo/dist
3:05:10 PM: Caching artifacts
3:05:10 PM: Started saving node modules
3:05:10 PM: Finished saving node modules
3:05:10 PM: Started saving build plugins
3:05:10 PM: Finished saving build plugins
3:05:10 PM: Started saving yarn cache
3:05:10 PM: Finished saving yarn cache
3:05:10 PM: Started saving pip cache
3:05:10 PM: Finished saving pip cache
3:05:10 PM: Started saving emacs cask dependencies
3:05:10 PM: Finished saving emacs cask dependencies
3:05:10 PM: Started saving maven dependencies
3:05:10 PM: Finished saving maven dependencies
3:05:10 PM: Started saving boot dependencies
3:05:10 PM: Finished saving boot dependencies
3:05:10 PM: Started saving go dependencies
3:05:10 PM: Finished saving go dependencies
3:05:13 PM: Error running command: Build script returned non-zero exit code: 1
3:05:13 PM: Failing build: Failed to build site
3:05:13 PM: Failed during stage ‘building site’: Build script returned non-zero exit code: 1
3:05:13 PM: Finished processing build request in 1m3.582997458s

I also tried to edit my package.json file with “CI= npm run build” but still not working…

Can you build locally? This quote from your logs makes me think you cannot, or that you do not have netlify configured identically to your local build environment. This failure is not related to our build system, but to your code:

Problem solved! Fixing the sitemap error did the trick.

For the record, I didn’t have to set the build command to “CI= npm run build”. A standard “gridsome build” command worked.

Thank you.

1 Like

A post was split to a new topic: Uglify makes my build fail