Build script: non-zero exit code: 127

Please help me! Have tried various things like changing the build command, and build directory, but nothing seems to work.

Deploy Settings:

Build Command: CI=npm run build
Publish Directory: build/


9:01:56 PM: Error message
9:01:56 PM: Command failed with exit code 127: CI=npm run build (Search results for '"non-zero exit code: 127"' - Netlify Support Forums)
9:01:56 PM: ​
9:01:56 PM: Error location
9:01:56 PM: In Build command from Netlify app:
9:01:56 PM: CI=npm run build
9:01:56 PM: ​
9:01:56 PM: Resolved config
9:01:56 PM: build:
9:01:56 PM: command: CI=npm run build
9:01:56 PM: commandOrigin: ui
9:01:56 PM: publish: /opt/build/repo/build
9:01:56 PM: publishOrigin: ui

Does it have to do with that I’m using NPM?

Hey @codeyStein

Unfortunately the snippet of the deploy log provided omits the portion that would explain where the error stemmed from.

Can you post the full deploy log, or if logs are public the link to the latest failed log.

Alternatively check out these resources

Hi, sorry here’s the link of the full log: Netlify App

Thanks @codeyStein

The issue

1:01:56 PM: $ CI=npm run build
1:01:56 PM: bash: run: command not found

Setting CI to something other than true isn’t always necessary. npm run build should work in most instances. If you really wish to have CI set to false the command is

CI= npm run build

(note the space after the =)

1 Like

That was it! Thanks so much, I can’t belive it was that simple haha

1 Like