confident-swartz-b9d5a9
The project builds just fine locally after I update old dependencies, but in netlify it result in this error:
8:34:45 PM: build-image version: b10eca693fcef557d4b9aede0849ef167f537e27 (focal)
8:34:45 PM: buildbot version: b10eca693fcef557d4b9aede0849ef167f537e27
8:34:45 PM: Building without cache
8:34:45 PM: Starting to prepare the repo for build
8:34:46 PM: No cached dependencies found. Cloning fresh repo
8:34:46 PM: git clone --filter=blob:none git@gitlab.com:pak-budi/psikotes
8:34:46 PM: Preparing Git Reference refs/heads/develop
8:34:48 PM: Parsing package.json dependencies
8:34:50 PM: Starting to install dependencies
8:34:50 PM: Python version set to 3.8
8:34:50 PM: Attempting Ruby version 2.7.2, read from environment
8:34:50 PM: Using Ruby version 2.7.2
8:34:51 PM: Started restoring cached go cache
8:34:51 PM: Finished restoring cached go cache
8:34:51 PM: Installing Go version 1.19.5 (requested 1.19.5)
8:34:55 PM: go version go1.19.5 linux/amd64
8:34:56 PM: Using PHP version 8.0
8:34:56 PM: Attempting Node.js version ‘10’ from .nvmrc
8:34:57 PM: Downloading and installing node v10.24.1…
8:34:57 PM: Downloading https://nodejs.org/dist/v10.24.1/node-v10.24.1-linux-x64.tar.xz…
8:34:57 PM: Computing checksum with sha256sum
8:34:57 PM: Checksums matched!
8:34:59 PM: Now using node v10.24.1 (npm v6.14.12)
8:34:59 PM: Started restoring cached build plugins
8:34:59 PM: Finished restoring cached build plugins
8:34:59 PM: Started restoring cached corepack dependencies
8:34:59 PM: Finished restoring cached corepack dependencies
8:34:59 PM: No npm workspaces detected
8:34:59 PM: Started restoring cached node modules
8:34:59 PM: Finished restoring cached node modules
8:35:00 PM: Installing npm packages using npm version 6.14.12
8:35:20 PM: npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I’ll try to do my best with it!
8:35:20 PM: > protobufjs@7.2.3 postinstall /opt/build/repo/node_modules/@grpc/grpc-js/node_modules/protobufjs
8:35:20 PM: > node scripts/postinstall
8:35:20 PM: > core-js@2.6.12 postinstall /opt/build/repo/node_modules/core-js
8:35:20 PM: > node -e “try{require(‘./postinstall’)}catch(e){}”
8:35:20 PM: > core-js-pure@3.30.1 postinstall /opt/build/repo/node_modules/core-js-pure
8:35:20 PM: > node -e “try{require(‘./postinstall’)}catch(e){}”
8:35:20 PM: > protobufjs@6.11.3 postinstall /opt/build/repo/node_modules/protobufjs
8:35:20 PM: > node scripts/postinstall
8:35:20 PM: > core-js@3.30.1 postinstall /opt/build/repo/node_modules/react-app-polyfill/node_modules/core-js
8:35:20 PM: > node -e “try{require(‘./postinstall’)}catch(e){}”
8:35:21 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents):
8:35:21 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
8:35:21 PM: added 1641 packages from 728 contributors and audited 1642 packages in 20.815s
8:35:21 PM: 234 packages are looking for funding
8:35:21 PM: run npm fund
for details
8:35:21 PM: found 1 high severity vulnerability
8:35:21 PM: run npm audit fix
to fix them, or npm audit
for details
8:35:21 PM: npm packages installed
8:35:22 PM: Install dependencies script success
8:35:22 PM: Starting build script
8:35:22 PM: Detected 1 framework(s)
8:35:22 PM: “create-react-app” at version “5.0.1”
8:35:22 PM: Section completed: initializing
8:35:24 PM:
8:35:24 PM: Netlify Build
8:35:24 PM: ────────────────────────────────────────────────────────────────
8:35:24 PM:
8:35:24 PM: ❯ Version
8:35:24 PM: @netlify/build 29.9.2
8:35:24 PM:
8:35:24 PM: ❯ Flags
8:35:24 PM: baseRelDir: true
8:35:24 PM: buildId: 64395661843ea50076f1a057
8:35:24 PM: deployId: 64395661843ea50076f1a059
8:35:24 PM:
8:35:24 PM: ❯ Current directory
8:35:24 PM: /opt/build/repo
8:35:24 PM:
8:35:24 PM: ❯ Config file
8:35:24 PM: /opt/build/repo/netlify.toml
8:35:24 PM:
8:35:24 PM: ❯ Context
8:35:24 PM: production
8:35:24 PM:
8:35:24 PM: 1. Build command from Netlify app
8:35:24 PM: ────────────────────────────────────────────────────────────────
8:35:24 PM:
8:35:24 PM: $ CI=false npm run build:dev
8:35:24 PM: > tesminatbakat-luar-pakbudi@0.1.0 build:dev /opt/build/repo
8:35:24 PM: > REACT_APP_FIREBASE_PROD=NO npm run build
8:35:24 PM: > tesminatbakat-luar-pakbudi@0.1.0 build /opt/build/repo
8:35:24 PM: > react-scripts build
8:35:25 PM: /opt/build/repo/node_modules/eslint-webpack-plugin/node_modules/jest-worker/build/index.js:110
8:35:25 PM: _ending;
8:35:25 PM: ^
8:35:25 PM: SyntaxError: Unexpected token ;
8:35:25 PM: at Module._compile (internal/modules/cjs/loader.js:723:23)
8:35:25 PM: at Object.Module._extensions…js (internal/modules/cjs/loader.js:789:10)
8:35:25 PM: at Module.load (internal/modules/cjs/loader.js:653:32)
8:35:25 PM: at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
8:35:25 PM: at Function.Module._load (internal/modules/cjs/loader.js:585:3)
8:35:25 PM: at Module.require (internal/modules/cjs/loader.js:692:17)
8:35:25 PM: at require (internal/modules/cjs/helpers.js:25:18)
8:35:25 PM: at Object. (/opt/build/repo/node_modules/eslint-webpack-plugin/dist/getESLint.js:9:5)
8:35:25 PM: at Module._compile (internal/modules/cjs/loader.js:778:30)
8:35:25 PM: at Object.Module._extensions…js (internal/modules/cjs/loader.js:789:10)
8:35:25 PM: npm ERR! code ELIFECYCLE
8:35:25 PM: npm ERR! errno 1
8:35:25 PM: npm ERR! tesminatbakat-luar-pakbudi@0.1.0 build: react-scripts build
8:35:25 PM: npm ERR! Exit status 1
8:35:25 PM: npm ERR!
8:35:25 PM: npm ERR! Failed at the tesminatbakat-luar-pakbudi@0.1.0 build script.
8:35:25 PM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
8:35:25 PM: npm ERR! A complete log of this run can be found in:
8:35:25 PM: npm ERR! /opt/buildhome/.npm/_logs/2023-04-14T13_35_25_331Z-debug.log
8:35:25 PM: npm ERR! code ELIFECYCLE
8:35:25 PM: npm ERR! errno 1
8:35:25 PM: npm ERR! tesminatbakat-luar-pakbudi@0.1.0 build:dev: REACT_APP_FIREBASE_PROD=NO npm run build
8:35:25 PM: npm ERR! Exit status 1
8:35:25 PM: npm ERR!
8:35:25 PM: npm ERR! Failed at the tesminatbakat-luar-pakbudi@0.1.0 build:dev script.
8:35:25 PM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
8:35:25 PM: npm ERR! A complete log of this run can be found in:
8:35:25 PM: npm ERR! /opt/buildhome/.npm/_logs/2023-04-14T13_35_25_339Z-debug.log
8:35:25 PM:
8:35:25 PM: “build.command” failed
8:35:25 PM: ────────────────────────────────────────────────────────────────
8:35:25 PM:
8:35:26 PM: Failed during stage ‘building site’: Build script returned non-zero exit code: 2 (Search results for '"non-zero exit code: 2"' - Netlify Support Forums)
8:35:25 PM: Error message
8:35:25 PM: Command failed with exit code 1: CI=false npm run build:dev (Search results for '"non-zero exit code: 1"' - Netlify Support Forums)
8:35:25 PM:
8:35:25 PM: Error location
8:35:25 PM: In Build command from Netlify app:
8:35:25 PM: CI=false npm run build:dev
8:35:25 PM:
8:35:25 PM: Resolved config
8:35:25 PM: build:
8:35:25 PM: command: CI=false npm run build:dev
8:35:25 PM: commandOrigin: ui
8:35:25 PM: publish: /opt/build/repo/build
8:35:25 PM: publishOrigin: ui
8:35:25 PM: redirects:
8:35:25 PM: - from: /*
status: 200
to: /index.html
redirectsOrigin: config
Caching artifacts
8:35:25 PM: Started saving node modules
8:35:25 PM: Finished saving node modules
8:35:25 PM: Started saving build plugins
8:35:25 PM: Finished saving build plugins
8:35:25 PM: Started saving corepack cache
8:35:25 PM: Finished saving corepack cache
8:35:25 PM: Started saving pip cache
8:35:25 PM: Finished saving pip cache
8:35:25 PM: Started saving emacs cask dependencies
8:35:25 PM: Finished saving emacs cask dependencies
8:35:25 PM: Started saving maven dependencies
8:35:25 PM: Finished saving maven dependencies
8:35:25 PM: Started saving boot dependencies
8:35:25 PM: Finished saving boot dependencies
8:35:25 PM: Started saving rust rustup cache
8:35:25 PM: Finished saving rust rustup cache
8:35:25 PM: Started saving go dependencies
8:35:25 PM: Finished saving go dependencies
8:35:26 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
8:35:26 PM: Failing build: Failed to build site
8:35:26 PM: Finished processing build request in 41.495s
I’ve tried setting:
CI=false npm install && npm run build:dev
and
CI=false npm install && npm audit fix && run build:dev
as well as
CI=false npm install && npm audit fix --force && run build:dev
which is what I did locally. Locally it works just fine.