Alguém sabe como fazer deploy de uma aplicação react? Tento isso há algum tempo no Netlify e não consigo. A aplicação que estou tentando hospedar é a mais trivial de todas: https://github.com/josedhontas/teste2.0
Segue abaixo o deploy log:
10:48:39 PM: build-image version: 4e021f34e58c8c6c6ee69b078ac3e861fee3ee31 (focal)
10:48:39 PM: buildbot version: 4e021f34e58c8c6c6ee69b078ac3e861fee3ee31
10:48:39 PM: Fetching cached dependencies
10:48:39 PM: Failed to fetch cache, continuing with build
10:48:39 PM: Starting to prepare the repo for build
10:48:40 PM: No cached dependencies found. Cloning fresh repo
10:48:40 PM: git clone --filter=blob:none https://github.com/josedhontas/teste2.0
10:48:40 PM: Preparing Git Reference refs/heads/main
10:48:40 PM: Parsing package.json dependencies
10:48:41 PM: Starting to install dependencies
10:48:41 PM: Python version set to 3.8
10:48:42 PM: Attempting Ruby version 2.7.2, read from environment
10:48:42 PM: Using Ruby version 2.7.2
10:48:43 PM: Using PHP version 8.0
10:48:43 PM: Downloading and installing node v16.20.0...
10:48:44 PM: Downloading https://nodejs.org/dist/v16.20.0/node-v16.20.0-linux-x64.tar.xz...
10:48:44 PM: Computing checksum with sha256sum
10:48:44 PM: Checksums matched!
10:48:46 PM: Now using node v16.20.0 (npm v8.19.4)
10:48:46 PM: Enabling Node.js Corepack
10:48:46 PM: Started restoring cached build plugins
10:48:46 PM: Finished restoring cached build plugins
10:48:46 PM: Started restoring cached go cache
10:48:46 PM: Finished restoring cached go cache
10:48:46 PM: Installing Go version 1.19.5 (requested 1.19.5)
10:48:52 PM: go version go1.19.5 linux/amd64
10:48:52 PM: Install dependencies script success
10:48:52 PM: Starting build script
10:48:53 PM: Using stage install dependencies
10:48:53 PM: Detected 0 framework(s)
10:48:53 PM: Section completed: initializing
10:48:54 PM:
10:48:54 PM: Netlify Build
10:48:54 PM: ────────────────────────────────────────────────────────────────
10:48:54 PM:
10:48:54 PM: ❯ Version
10:48:54 PM: @netlify/build 29.8.0
10:48:54 PM:
10:48:54 PM: ❯ Flags
10:48:54 PM: baseRelDir: true
10:48:54 PM: buildId: 6424ea737b2f2a7b27b8f2e4
10:48:54 PM: deployId: 6424ea737b2f2a7b27b8f2e6
10:48:54 PM:
10:48:54 PM: ❯ Current directory
10:48:54 PM: /opt/build/repo
10:48:54 PM:
10:48:54 PM: ❯ Config file
10:48:54 PM: No config file was defined: using default values.
10:48:54 PM:
10:48:54 PM: ❯ Context
10:48:54 PM: production
10:48:54 PM:
10:48:54 PM: 1. Build command from Netlify app
10:48:54 PM: ────────────────────────────────────────────────────────────────
10:48:54 PM:
10:48:54 PM: $ npm run build
10:48:55 PM: npm ERR! code ENOENT
10:48:55 PM: npm ERR! syscall open
10:48:55 PM: npm ERR! path /opt/build/repo/package.json
10:48:55 PM: npm ERR! errno -2
10:48:55 PM: npm ERR! enoent ENOENT: no such file or directory, open '/opt/build/repo/package.json'
10:48:55 PM: npm ERR! enoent This is related to npm not being able to find a file.
10:48:55 PM: npm ERR! enoent
10:48:55 PM: npm ERR! A complete log of this run can be found in:
10:48:55 PM: npm ERR! /opt/buildhome/.npm/_logs/2023-03-30T01_48_55_061Z-debug-0.log
10:48:55 PM:
10:48:55 PM: "build.command" failed
10:48:55 PM:
10:48:55 PM: Error message
10:48:55 PM: Command failed with exit code 254: npm run build (https://ntl.fyi/exit-code-254)
10:48:56 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
10:48:55 PM:
10:48:55 PM: Error location
10:48:55 PM: In Build command from Netlify app:
10:48:55 PM: npm run build
10:48:55 PM:
10:48:55 PM: Resolved config
10:48:55 PM: build:
10:48:55 PM: command: npm run build
10:48:55 PM: commandOrigin: ui
10:48:55 PM: publish: /opt/build/repo/build
10:48:55 PM: publishOrigin: ui
10:48:55 PM: Caching artifacts
10:48:55 PM: Started saving build plugins
10:48:55 PM: Finished saving build plugins
10:48:55 PM: Started saving pip cache
10:48:55 PM: Finished saving pip cache
10:48:55 PM: Started saving emacs cask dependencies
10:48:55 PM: Finished saving emacs cask dependencies
10:48:55 PM: Started saving maven dependencies
10:48:55 PM: Finished saving maven dependencies
10:48:55 PM: Started saving boot dependencies
10:48:55 PM: Finished saving boot dependencies
10:48:55 PM: Started saving rust rustup cache
10:48:55 PM: Finished saving rust rustup cache
10:48:55 PM: Started saving go dependencies
10:48:55 PM: Finished saving go dependencies
10:48:56 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
10:48:56 PM: Failing build: Failed to build site
10:48:56 PM: Finished processing build request in 17.163s