zoukankan      html  css  js  c++  java
  • Ubuntu 20.04 安装 Node.js

    Installation instructions

    Node.js v14.x:

    # Using Ubuntu
    curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
    sudo apt-get install -y nodejs
    
    # Using Debian, as root
    curl -sL https://deb.nodesource.com/setup_14.x | bash -
    apt-get install -y nodejs

    Node.js v12.x:

    # Using Ubuntu
    curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
    sudo apt-get install -y nodejs
    
    # Using Debian, as root
    curl -sL https://deb.nodesource.com/setup_12.x | bash -
    apt-get install -y nodejs

    Node.js v10.x:

    # Using Ubuntu
    curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
    sudo apt-get install -y nodejs
    
    # Using Debian, as root
    curl -sL https://deb.nodesource.com/setup_10.x | bash -
    apt-get install -y nodejs

    Node.js LTS (v12.x):

    # Using Ubuntu
    curl -sL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
    sudo apt-get install -y nodejs
    
    # Using Debian, as root
    curl -sL https://deb.nodesource.com/setup_lts.x | bash -
    apt-get install -y nodejs

    Node.js Current (v14.x):

    # Using Ubuntu
    curl -sL https://deb.nodesource.com/setup_current.x | sudo -E bash -
    sudo apt-get install -y nodejs
    
    # Using Debian, as root
    curl -sL https://deb.nodesource.com/setup_current.x | bash -
    apt-get install -y nodejs

    Optional: install build tools

    To compile and install native addons from npm you may also need to install build tools:

    # use `sudo` on Ubuntu or run this as root on debian
    apt-get install -y build-essential

    Installation Registry

    npm config set registry https://registry.npm.taobao.org
    npm install nrm

    sudo gedit ~/.npmrc

    registry="https://registry.npm.taobao.org/"
    sass_binary_site="https://npm.taobao.org/mirrors/node-sass/"
    phantomjs_cdnurl="http://npm.taobao.org/mirrors/phantomjs/"
    electron_mirror="https://npm.taobao.org/mirrors/electron/"

    Clean Npm Cache


    npm cache clean -f
        
  • 相关阅读:
    Python中的list和tuple
    Python中输出格式化的字符串
    Python笔记-第一天
    在Lingo中输入矩阵(通过Excel)
    将Matlab中的矩阵输出到txt文件
    SQL中对于两个不同的表中的属性取差集except运算
    SQL中union运算操作的理解
    SQL笔记----在一个关系表中操作列
    MathType的公式在word中跟文字不对齐
    开发android过程中eclipse闪退解决
  • 原文地址:https://www.cnblogs.com/Areas/p/13466392.html
Copyright © 2011-2022 走看看