I am trying to set up the AWS Serverless framework in Ubuntu 16.04 LTS. I installed Node.js and have also installed Serverless using the following command: npm install -g serverless
in the terminal.
But when I try to run serverless
it returns an error saying serverless: command not found
. Below is a screenshot for reference:
Try running,
npm config set prefix /usr/local
and then,
npm i -g serverless
Was getting the same error serverless: command not found but instead of NPM was using YARN. To fix it had to execute (or better add to your ~/.bash_profile):
export PATH="$PATH:$(yarn global bin)"
then, if not already installed:
yarn global add serverless
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With