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
        
  • 相关阅读:
    C# extern关键字的用法
    C#自定义集合类(二)
    C#自定义集合类(一)
    LINQ中交集、并集、差集、去重(十四)
    LINQ中转换操作符(十三)
    Oracle实现连乘和求和
    适配器模式
    HTTP网络协议与手写Web服务容器
    代理模式
    设计模式的几条家规
  • 原文地址:https://www.cnblogs.com/Areas/p/13466392.html
Copyright © 2011-2022 走看看