Typescript/Rect build fails - Svg not found

Hello,
I have an issue with my build and according to the log, it’s because it can’t find an svg. The icon’s name is fine in the code and typing npm run build is fine too. I’ve already tried to delete and put it again and it still doesn’t work. Here’s the log:

5:56:54 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)
5:56:33 PM: build-image version: 6cae66f783f2b7ff8e3a9cdbb5031761f0b47719 (focal)
5:56:33 PM: buildbot version: cb74d097ea8f76bcaa16d435b6bf29d5a1715ede
5:56:33 PM: Fetching cached dependencies
5:56:33 PM: Failed to fetch cache, continuing with build
5:56:33 PM: Starting to prepare the repo for build
5:56:34 PM: No cached dependencies found. Cloning fresh repo
5:56:34 PM: git clone --filter=blob:none https://github.com/EstelleRoges/Koya
5:56:34 PM: Preparing Git Reference refs/heads/master
5:56:37 PM: Starting to install dependencies
5:56:37 PM: Python version set to 3.8
5:56:37 PM: Attempting Ruby version 2.7.2, read from environment
5:56:37 PM: Using Ruby version 2.7.2
5:56:38 PM: Started restoring cached go cache
5:56:38 PM: Finished restoring cached go cache
5:56:39 PM: go version go1.19.12 linux/amd64
5:56:40 PM: Using PHP version 8.0
5:56:41 PM: v18.17.1 is already installed.
5:56:41 PM: Now using node v18.17.1 (npm v9.6.7)
5:56:41 PM: Enabling Node.js Corepack
5:56:41 PM: Started restoring cached build plugins
5:56:41 PM: Finished restoring cached build plugins
5:56:41 PM: Started restoring cached corepack dependencies
5:56:41 PM: Finished restoring cached corepack dependencies
5:56:41 PM: No npm workspaces detected
5:56:41 PM: Started restoring cached node modules
5:56:41 PM: Finished restoring cached node modules
5:56:41 PM: Installing npm packages using npm version 9.6.7
5:56:45 PM: added 367 packages, and audited 368 packages in 3s
5:56:45 PM: 47 packages are looking for funding
5:56:45 PM: run npm fund for details
5:56:45 PM: found 0 vulnerabilities
5:56:45 PM: npm packages installed
5:56:45 PM: Install dependencies script success
5:56:45 PM: Starting build script
5:56:46 PM: Detected 1 framework(s)
5:56:46 PM: vite at version 4.4.6
5:56:46 PM: Section completed: initializing
5:56:48 PM: ​
5:56:48 PM: Netlify Build
5:56:48 PM: ────────────────────────────────────────────────────────────────
5:56:48 PM: ​
5:56:48 PM: ❯ Version
5:56:48 PM: @netlify/build 29.20.6
5:56:48 PM: ​
5:56:48 PM: ❯ Flags
5:56:48 PM: baseRelDir: true
5:56:48 PM: buildId: 64ee15140a097e00080c76a6
5:56:48 PM: deployId: 64ee15140a097e00080c76a8
5:56:48 PM: ​
5:56:48 PM: ❯ Current directory
5:56:48 PM: /opt/build/repo
5:56:48 PM: ​
5:56:48 PM: ❯ Config file
5:56:48 PM: No config file was defined: using default values.
5:56:48 PM: ​
5:56:48 PM: ❯ Context
5:56:48 PM: production
5:56:48 PM: ​
5:56:48 PM: Build command from Netlify app
5:56:48 PM: ────────────────────────────────────────────────────────────────
5:56:48 PM: ​
5:56:48 PM: $ npm run build
5:56:48 PM: > koya@0.0.0 build
5:56:48 PM: > tsc && vite build
5:56:51 PM: vite v4.4.6 building for production…
5:56:51 PM: transforming…
5:56:52 PM: ✓ 88 modules transformed.
5:56:52 PM: ✓ built in 685ms
5:56:52 PM: Could not resolve …/…/…/assets/svg/menuIcon.svg from src/components/AppElements/Navbar/Navbar.tsx
5:56:52 PM: file: /opt/build/repo/src/components/AppElements/Navbar/Navbar.tsx
5:56:52 PM: error during build:
5:56:52 PM: RollupError: Could not resolve …/…/…/assets/svg/menuIcon.svg from src/components/AppElements/Navbar/Navbar.tsx
5:56:52 PM: at error (file:///opt/build/repo/node_modules/rollup/dist/es/shared/node-entry.js:2245:30)
5:56:52 PM: at ModuleLoader.handleInvalidResolvedId (file:///opt/build/repo/node_modules/rollup/dist/es/shared/node-entry.js:24654:24)
5:56:52 PM: at file:///opt/build/repo/node_modules/rollup/dist/es/shared/node-entry.js:24616:26
5:56:52 PM: ​
5:56:52 PM: build.command failed
5:56:52 PM: ────────────────────────────────────────────────────────────────
5:56:52 PM: ​
5:56:52 PM: Error message
5:56:52 PM: Command failed with exit code 1: npm run build (Search results for '"non-zero exit code: 1"' - Netlify Support Forums)
5:56:52 PM: ​
5:56:52 PM: Error location
5:56:52 PM: In Build command from Netlify app:
5:56:52 PM: npm run build
5:56:52 PM: ​
5:56:52 PM: Resolved config
5:56:52 PM: build:
5:56:52 PM: command: npm run build
5:56:52 PM: commandOrigin: ui
5:56:52 PM: publish: /opt/build/repo/dist
5:56:52 PM: publishOrigin: ui
5:56:52 PM: Caching artifacts
5:56:52 PM: Started saving node modules
5:56:52 PM: Finished saving node modules
5:56:52 PM: Started saving build plugins
5:56:52 PM: Finished saving build plugins
5:56:52 PM: Started saving corepack cache
5:56:52 PM: Finished saving corepack cache
5:56:52 PM: Started saving pip cache
5:56:52 PM: Finished saving pip cache
5:56:52 PM: Started saving emacs cask dependencies
5:56:52 PM: Finished saving emacs cask dependencies
5:56:52 PM: Started saving maven dependencies
5:56:52 PM: Finished saving maven dependencies
5:56:52 PM: Started saving boot dependencies
5:56:52 PM: Finished saving boot dependencies
5:56:52 PM: Started saving rust rustup cache
5:56:52 PM: Finished saving rust rustup cache
5:56:52 PM: Started saving go dependencies
5:56:53 PM: Finished saving go dependencies
5:56:54 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
5:56:54 PM: Failing build: Failed to build site
5:56:54 PM: Finished processing build request in 20.992s

Thanks in advance for your help

It built without issue as soon as I did this. Thank you!