Reputation: 241
I am trying to install AWS SAM (Serverless Application Model) Local on Ubuntu 16.04.
I tried to install SAM Local using NPM with the following command.
npm install -g aws-sam-local
I got the following error.
Please help me to sort it out?
Upvotes: 2
Views: 4374
Reputation: 301
Installation on Ubuntu 16.04/18.04
sudo apt-get install python3-pip -y
sudo -H python3 -m pip install aws-sam-cli
Upvotes: 4
Reputation: 41
If issue with current user permissions, please use sudo with below commands First try,
npm config set unsafe-perm=true
Then,
npm install -g go-npm
finally, npm install -g aws-sam-local
It will also work for mac.
Upvotes: 0
Reputation: 3047
first try
npm install -g go-npm
then
npm install -g aws-sam-local
Upvotes: 0
Reputation: 5700
The standard shebang for node is #!/usr/bin/env node
. There is a package conflict with the name node, so it's named nodejs.
You can solve the issue with a symlink using alternatives.
sudo update-alternatives --install /usr/bin/node node /usr/bin/nodejs 10
Upvotes: 1