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.
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
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:D
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.