Installing NPM on AWS EC2

后端 未结 9 1058
名媛妹妹
名媛妹妹 2021-01-31 13:52

Working on Ec2 on AWS.

I have installed Node.js and it works fine.

But the problem arises when trying to install npm.

I am using the following command to

9条回答
  •  终归单人心
    2021-01-31 14:57

    Follow this AWS Tutorial that uses Node Version Manager.

    Node Version Manager (NVM) lets you install multiple versions of Node.js and switch between them.


    Here are the steps:

    Install NVM

    curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.0/install.sh | bash
    

    Activate NVM

    . ~/.nvm/nvm.sh
    

    Install Node (choose version)

    nvm install 4.4.5
    

    Confirm Successful Installation

    node -e "console.log('Running Node.js ' + process.version)"
    

提交回复
热议问题