Sh: 1: serverless: Permission denied


We use Circle CI to package and deploy our serverless API to AWS and have noticed an increasing number of builds with the following error. Has anyone experienced this error and how were you able to resolve it?

#!/bin/bash -eo pipefail
npm run package -- --stage $STAGE --branch $CIRCLE_BRANCH

> example-api@1.0.0 package /home/circleci/project
> serverless package "--stage" "tst" "--branch" "example-branch"

sh: 1: serverless: Permission denied
npm ERR! errno 126
npm ERR! example-api@1.0.0 package: `serverless package "--stage" "tst" "--branch" "example-branch"`
npm ERR! Exit status 126
npm ERR! 
npm ERR! Failed at the cb-olo-acl@1.0.0 package script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/circleci/.npm/_logs/2019-05-17T05_58_25_306Z-debug.log
Exited with code 126

What does it say in here?

1 Like