I checked the relative errors and answers from the community but it did not exactly match ith the erroe I am getting. I am really frustrated, because I am new to coding. However I successfully build the site and publish it the last time. This time I just updated the infos in my site and I got this error which I dont get because al the other packages were intact. Heres is the log
5:01:07 PM: Netlify Build
5:01:07 PM: ────────────────────────────────────────────────────────────────
5:01:07 PM:
5:01:07 PM: ❯ Version
5:01:07 PM: @netlify/build 35.5.14
5:01:07 PM:
5:01:07 PM: ❯ Flags
5:01:07 PM: accountId: 6925040bd4a1d929c0a592a7
5:01:07 PM: baseRelDir: true
5:01:07 PM: buildId: 6983511684df1d84f3f9f081
5:01:07 PM: deployId: 6983511684df1d84f3f9f083
5:01:08 PM:
5:01:08 PM: ❯ Current directory
5:01:08 PM: /opt/build/repo
5:01:08 PM:
5:01:08 PM: ❯ Config file
5:01:08 PM: No config file was defined: using default values.
5:01:08 PM:
5:01:08 PM: ❯ Context
5:01:08 PM: production
5:01:08 PM:
5:01:08 PM: Build command from Netlify app
5:01:08 PM: ────────────────────────────────────────────────────────────────
5:01:08 PM:
5:01:08 PM: $ npm run build
5:01:08 PM: > web_page@1.0.0 build
5:01:08 PM: > vite build
5:01:08 PM: sh: 1: vite: Permission denied
5:01:08 PM:
5:01:08 PM: “build.command” failed
5:01:08 PM: ────────────────────────────────────────────────────────────────
5:01:08 PM:
5:01:08 PM: Error message
5:01:08 PM: Command failed with exit code 127: npm run build (https://ntl.fyi/exit-code-127)
5:01:08 PM:
5:01:08 PM: Error location
5:01:08 PM: In Build command from Netlify app:
5:01:08 PM: npm run build
5:01:08 PM:
5:01:08 PM: Resolved config
5:01:08 PM: build:
5:01:08 PM: command: npm run build
5:01:08 PM: commandOrigin: ui
5:01:08 PM: publish: /opt/build/repo/build
5:01:08 PM: publishOrigin: ui
5:01:08 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
5:01:08 PM: Failing build: Failed to build site
5:01:08 PM: Finished processing build request in 14.098s
5:01:08 PM: Failed during stage ‘building site’: Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
I checked publish directory and my vite configs, theres no mismatch