Reputation: 53
I am new to the computer world and I am struggling to install the npm
command on a Amazon Linux AMI 2018.03
Can someone guide me on a step-by-step to be able to install on my instance the NPM command?
Thanks.
Upvotes: 5
Views: 8381
Reputation: 11513
This is what i tried and worked for me brew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install node
, this will install npm too along with node, 1 shot 2 kill :DUpvotes: 0
Reputation: 2545
For that, you need to connect to the EC2 instance using the SSH connection.
After you need to install Node.js into the instance. Installing Node.js also installs the Node Package Manager (npm) so you can install additional modules as needed.
Here is the step by step guide on how to do it
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash
. ~/.nvm/nvm.sh
nvm install node
node -v
npm -v
For more information, you can check AWS Documentation
Upvotes: 11