Hello Friendly Forum Fiends
I hope someone might be able to help a Netlify-Newbie
I am trying to follow community guidelines best I can, please correct me if I have done something incorrectly.
Brief Description of the project
So I have built this relatively simple e-commerce portfolio project and I cannot seem to get it to deploy/build through Netlify.
This is React project built with Vite ,
using FireBase for user Authentication and FireStore for very basic database.
using Stripe API - I have created the necessary Environment Variables, added through the app.Netlify web page (using .env when running locally)
Details are as follows:
Netlify site name:
https://candid-rabanadas-90d3ef.netlify.app/
GitHub Repo: (main branch)
https://github.com/DevonGifford/Ecommerce_Showcase
Things I have tried:
- I have tried the following build commands: (clearing cache each time)
- CI= npm run build
- npm run build
- vite build
- Initially I had naming convention issues and after checking the forum and fixing, I am now getting stuck again
Finally, the app is working when I run locally on my machine with both
- npm run dev
- netlify dev
Also tried to host/deploy directly from the CLI tool however facing the same error of not being able to resolve this same component.
Build settings screenshot
Please see below the FULL build log
> 12:36:56 AM: build-image version: 3b96229e32b19cdf63f20dc1fc9331cd240c2d01 (focal)
> 12:36:56 AM: buildbot version: 3b96229e32b19cdf63f20dc1fc9331cd240c2d01
> 12:36:56 AM: Building without cache
> 12:36:56 AM: Starting to prepare the repo for build
> 12:36:56 AM: No cached dependencies found. Cloning fresh repo
> 12:36:56 AM: git clone --filter=blob:none https://github.com/DevonGifford/Ecommerce_Showcase
> 12:36:57 AM: Preparing Git Reference refs/heads/main
> 12:36:58 AM: Starting to install dependencies
> 12:36:58 AM: Python version set to 3.8
> 12:36:59 AM: Attempting Ruby version 2.7.2, read from environment
> 12:36:59 AM: Using Ruby version 2.7.2
> 12:37:00 AM: Started restoring cached go cache
> 12:37:00 AM: Finished restoring cached go cache
> 12:37:00 AM: go version go1.19.10 linux/amd64
> 12:37:00 AM: Using PHP version 8.0
> 12:37:01 AM: v18.16.0 is already installed.
> 12:37:01 AM: Now using node v18.16.0 (npm v9.5.1)
> 12:37:01 AM: Enabling Node.js Corepack
> 12:37:01 AM: Started restoring cached build plugins
> 12:37:01 AM: Finished restoring cached build plugins
> 12:37:01 AM: Started restoring cached corepack dependencies
> 12:37:01 AM: Finished restoring cached corepack dependencies
> 12:37:01 AM: No npm workspaces detected
> 12:37:01 AM: Started restoring cached node modules
> 12:37:01 AM: Finished restoring cached node modules
> 12:37:02 AM: Installing npm packages using npm version 9.5.1
> 12:37:08 AM: added 428 packages, and audited 429 packages in 6s
> 12:37:08 AM: 105 packages are looking for funding
> 12:37:08 AM: run `npm fund` for details
> 12:37:08 AM: found 0 vulnerabilities
> 12:37:08 AM: npm packages installed
> 12:37:09 AM: Install dependencies script success
> 12:37:09 AM: Starting build script
> 12:37:09 AM: Detected 1 framework(s)
> 12:37:09 AM: vite at version 4.3.9
> 12:37:09 AM: Section completed: initializing
> 12:37:11 AM: β
> 12:37:11 AM: Netlify Build
> 12:37:11 AM: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
> 12:37:11 AM: β
> 12:37:11 AM: β― Version
> 12:37:11 AM: @netlify/build 29.12.1
> 12:37:11 AM: β
> 12:37:11 AM: β― Flags
> 12:37:11 AM: baseRelDir: true
> 12:37:11 AM: buildId: 6488ef865718442e1f45fd50
> 12:37:11 AM: deployId: 6488ef865718442e1f45fd52
> 12:37:11 AM: β
> 12:37:11 AM: β― Current directory
> 12:37:11 AM: /opt/build/repo
> 12:37:11 AM: β
> 12:37:11 AM: β― Config file
> 12:37:11 AM: No config file was defined: using default values.
> 12:37:11 AM: β
> 12:37:11 AM: β― Context
> 12:37:11 AM: production
> 12:37:11 AM: β
> 12:37:11 AM: Build command from Netlify app
> 12:37:11 AM: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
> 12:37:11 AM: β
> 12:37:11 AM: $ vite build
> 12:37:11 AM: vite v4.3.9 building for production...
> 12:37:11 AM: transforming...
> 12:37:13 AM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
> 12:37:12 AM: β 78 modules transformed.
> 12:37:12 AM: β built in 680ms
> 12:37:12 AM: Could not resolve ../../components/front-splash/front-splash.component from src/routes/home/home.component.jsx
> 12:37:12 AM: file: /opt/build/repo/src/routes/home/home.component.jsx
> 12:37:12 AM: error during build:
> 12:37:12 AM: RollupError: Could not resolve ../../components/front-splash/front-splash.component from src/routes/home/home.component.jsx
> 12:37:12 AM: at error (file:///opt/build/repo/node_modules/rollup/dist/es/shared/node-entry.js:2124:30)
> 12:37:12 AM: at ModuleLoader.handleInvalidResolvedId (file:///opt/build/repo/node_modules/rollup/dist/es/shared/node-entry.js:23990:24)
> 12:37:12 AM: at file:///opt/build/repo/node_modules/rollup/dist/es/shared/node-entry.js:23952:26
> 12:37:12 AM: β
> 12:37:12 AM: build.command failed
> 12:37:12 AM: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
> 12:37:12 AM: β
> 12:37:12 AM: Error message
> 12:37:12 AM: Command failed with exit code 1: vite build (https://ntl.fyi/exit-code-1)
> 12:37:12 AM: β
> 12:37:12 AM: Error location
> 12:37:12 AM: In Build command from Netlify app:
> 12:37:12 AM: vite build
> 12:37:12 AM: β
> 12:37:12 AM: Resolved config
> 12:37:12 AM: build:
> 12:37:12 AM: command: vite build
> 12:37:12 AM: commandOrigin: ui
> 12:37:12 AM: environment:
> 12:37:12 AM: - VITE_REACT_APP_STRIPE_PUBLISHABE_KEY
> 12:37:12 AM: - VITE_STRIPE_SECRET_KEY
> 12:37:12 AM: publish: /opt/build/repo/dist
> 12:37:12 AM: publishOrigin: ui
> 12:37:12 AM: functionsDirectory: /opt/build/repo/netlify/functions
> 12:37:12 AM: Caching artifacts
> 12:37:12 AM: Started saving node modules
> 12:37:12 AM: Finished saving node modules
> 12:37:12 AM: Started saving build plugins
> 12:37:12 AM: Finished saving build plugins
> 12:37:12 AM: Started saving corepack cache
> 12:37:12 AM: Finished saving corepack cache
> 12:37:12 AM: Started saving pip cache
> 12:37:12 AM: Finished saving pip cache
> 12:37:12 AM: Started saving emacs cask dependencies
> 12:37:12 AM: Finished saving emacs cask dependencies
> 12:37:12 AM: Started saving maven dependencies
> 12:37:12 AM: Finished saving maven dependencies
> 12:37:12 AM: Started saving boot dependencies
> 12:37:12 AM: Finished saving boot dependencies
> 12:37:12 AM: Started saving rust rustup cache
> 12:37:12 AM: Finished saving rust rustup cache
> 12:37:12 AM: Started saving go dependencies
> 12:37:12 AM: Finished saving go dependencies
> 12:37:13 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
> 12:37:13 AM: Failing build: Failed to build site
> 12:37:13 AM: Finished processing build request in 17.404s
Thank you in advance for anyone who takes the time to point me in the right direction