Hello everyone,
I just created a small Vite/React app and put it on Github. I just tried to deploy it with Netlify with default settings but got this error during the build phase :
11:47:03 AM: Netlify Build
11:47:03 AM: ────────────────────────────────────────────────────────────────
11:47:03 AM:
11:47:03 AM: ❯ Version
11:47:03 AM: @netlify/build 29.54.6
11:47:03 AM:
11:47:03 AM: ❯ Flags
11:47:03 AM: accountId: 5f9681c81080498d848cbd72
11:47:03 AM: baseRelDir: true
11:47:03 AM: buildId: 66fbc4f110ed25f7fec5d445
11:47:03 AM: deployId: 66fbc4f110ed25f7fec5d447
11:47:03 AM:
11:47:03 AM: ❯ Current directory
11:47:03 AM: /opt/build/repo
11:47:03 AM:
11:47:03 AM: ❯ Config file
11:47:03 AM: No config file was defined: using default values.
11:47:03 AM:
11:47:03 AM: ❯ Context
11:47:03 AM: production
11:47:03 AM:
11:47:03 AM: Build command from Netlify app
11:47:03 AM: ────────────────────────────────────────────────────────────────
11:47:03 AM:
11:47:03 AM: $ remix vite:build
11:47:03 AM: bash: remix: command not found
11:47:03 AM:
11:47:03 AM: "build.command" failed
11:47:03 AM: ────────────────────────────────────────────────────────────────
11:47:03 AM:
11:47:03 AM: Error message
11:47:03 AM: Command failed with exit code 127: remix vite:build (https://ntl.fyi/exit-code-127)
11:47:03 AM:
11:47:03 AM: Error location
11:47:03 AM: In Build command from Netlify app:
11:47:03 AM: remix vite:build
11:47:03 AM:
11:47:03 AM: Resolved config
11:47:03 AM: build:
11:47:03 AM: command: remix vite:build
11:47:03 AM: commandOrigin: ui
11:47:03 AM: publish: /opt/build/repo/dist/client
11:47:03 AM: publishOrigin: ui
11:47:03 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
11:47:04 AM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
11:47:04 AM: Failing build: Failed to build site
11:47:04 AM: Finished processing build request in 19.837s
I have several apps deployed here so the connection with my Github account is fine. This my first app using Vite though.
What is causing this fail and how could I solve it ?