- site name:
https://amanoryd.es/
Hi everyone, today im having problems deploying my site, yesterday everything was perfect but today when I push a new page to my project im having the message in console:
6:15:08 PM: build-image version: fcb0c1b3ada6d25c1cb58e8bc514f5f23cc14f15 (focal)
6:15:08 PM: buildbot version: b01fe4bfba24ebbf2be94776e35d0c0d9decd607
6:15:08 PM: Building without cache
6:15:08 PM: Starting to prepare the repo for build
6:15:08 PM: No cached dependencies found. Cloning fresh repo
6:15:08 PM: git clone --filter=blob:none https://github.com/amanoryd/amanoryd.es
6:15:09 PM: Preparing Git Reference refs/heads/main
6:15:13 PM: Starting to install dependencies
6:15:14 PM: Python version set to 3.8
6:15:14 PM: Attempting Ruby version 2.7.2, read from environment
6:15:14 PM: Using Ruby version 2.7.2
6:15:15 PM: Started restoring cached go cache
6:15:15 PM: Finished restoring cached go cache
6:15:16 PM: go version go1.19.13 linux/amd64
6:15:17 PM: Using PHP version 8.0
6:15:18 PM: v18.19.0 is already installed.
6:15:18 PM: Now using node v18.19.0 (npm v10.2.3)
6:15:18 PM: Enabling Node.js Corepack
6:15:18 PM: Started restoring cached build plugins
6:15:18 PM: Finished restoring cached build plugins
6:15:18 PM: Started restoring cached corepack dependencies
6:15:18 PM: Finished restoring cached corepack dependencies
6:15:18 PM: No npm workspaces detected
6:15:18 PM: Started restoring cached node modules
6:15:18 PM: Finished restoring cached node modules
6:15:19 PM: Installing npm packages using npm version 10.2.3
6:15:21 PM: npm WARN deprecated @vitejs/plugin-react-refresh@1.3.6: This package has been deprecated in favor of @vitejs/plugin-react
6:15:23 PM: added 299 packages, and audited 300 packages in 5s
6:15:23 PM: 102 packages are looking for funding
6:15:23 PM: run npm fund
for details
6:15:23 PM: found 0 vulnerabilities
6:15:23 PM: npm packages installed
6:15:24 PM: Successfully installed dependencies
6:15:24 PM: Starting build script
6:15:25 PM: Detected 1 framework(s)
6:15:25 PM: βviteβ at version β5.0.12β
6:15:25 PM: Section completed: initializing
6:15:26 PM: β
6:15:26 PM: Netlify Build
6:15:26 PM: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
6:15:26 PM: β
6:15:26 PM: β― Version
6:15:26 PM: @netlify/build 29.33.2
6:15:26 PM: β
6:15:26 PM: β― Flags
6:15:26 PM: baseRelDir: true
6:15:26 PM: buildId: 65bbd17fef51f30535271775
6:15:26 PM: deployId: 65bbd17fef51f30535271777
6:15:26 PM: β
6:15:26 PM: β― Current directory
6:15:26 PM: /opt/build/repo
6:15:26 PM: β
6:15:26 PM: β― Config file
6:15:26 PM: No config file was defined: using default values.
6:15:26 PM: β
6:15:26 PM: β― Context
6:15:26 PM: production
6:15:26 PM: β
6:15:26 PM: Build command from Netlify app
6:15:26 PM: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
6:15:26 PM: β
6:15:26 PM: $ npm run build
6:15:27 PM: > amanoryd.es@0.0.0 build
6:15:27 PM: > vite build
6:15:27 PM: vite v5.0.12 building for productionβ¦
6:15:27 PM: transformingβ¦
6:15:27 PM: β 3 modules transformed.
6:15:27 PM: Could not resolve β./src/Mainβ from βindex.jsxβ
6:15:27 PM: file: /opt/build/repo/index.jsx
6:15:27 PM: error during build:
6:15:27 PM: RollupError: Could not resolve β./src/Mainβ from βindex.jsxβ
6:15:27 PM: at error (file:///opt/build/repo/node_modules/rollup/dist/es/shared/parseAst.js:337:30)
6:15:27 PM: at ModuleLoader.handleInvalidResolvedId (file:///opt/build/repo/node_modules/rollup/dist/es/shared/node-entry.js:18022:24)
6:15:27 PM: at file:///opt/build/repo/node_modules/rollup/dist/es/shared/node-entry.js:17982:26
6:15:27 PM: β
6:15:27 PM: βbuild.commandβ failed
6:15:27 PM: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
6:15:27 PM: β
6:15:27 PM: Error message
6:15:27 PM: Command failed with exit code 1: npm run build (Search results for '"non-zero exit code: 1"' - Netlify Support Forums)
6:15:27 PM: β
6:15:27 PM: Error location
6:15:27 PM: In Build command from Netlify app:
6:15:27 PM: npm run build
6:15:27 PM: β
6:15:27 PM: Resolved config
6:15:27 PM: build:
6:15:27 PM: command: npm run build
6:15:27 PM: commandOrigin: ui
6:15:27 PM: environment:
6:15:27 PM: - VITE_PUBLIC_GOOGLE_MAPS_API_KEY
6:15:27 PM: - VITE_REACT_APP_API_INSTAGRAM_TOKEN
6:15:27 PM: publish: /opt/build/repo/dist
6:15:27 PM: publishOrigin: ui
6:15:27 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
6:15:27 PM: Failing build: Failed to build site
6:15:28 PM: Failed during stage βbuilding siteβ: Build script returned non-zero exit code: 2
6:15:28 PM: Finished processing build request in 19.645s
My project is created in Vite.js and in localhost runing βnpm run devβ works normal.
I readed about add βCLIβ before de npm run build in Netlify but im questioning why i have to do that if my project was working normally.
Thanks,