Strapi build , /bin/sh: 1: strapi: not found, error Command failed with exit code 127

i getting this error when i was deploying my backend file in the render

1 Like

This means strapi package is not found.

Check if it’s a correct. Reinstall the package again .

If error existed try deleting node modules
rm -r node_modules and npm install

1 Like

Specify configs in the ini-formatted file:
/opt/render/.npmrc
or on the command line via: npm --key=value

More configuration info: npm help config
Configuration fields: npm help 7 config

npm@10.1.0 /opt/render/project/nodes/node-20.9.0/lib/node_modules/npm
Unknown command: “build”

Did you mean this?
npm run build # run the “build” package script

To see a list of supported npm commands, run:
npm help
==> Build failed :disappointed:
after deleting node_modules and reinstall the node_modules i got this error

Can I see your package.json ?

And it's npm run build

Code 127 means that the command you specified, in this case strapi, is not found. It’s most likely that you have strapi listed in devDependencies, which are not installed when Node runs in production mode, which is the default on Render.

Move strapi’s entry into the list of dependencies.

1 Like

I have the same problem. How can i do this: Move strapi ’s entry into the list of dependencies .

I’ve just came up with the solution:

Build Command as :
yarn; yarn build

Tell me if this works for you guys! ;D

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.