zoukankan      html  css  js  c++  java
  • ubatu 安装nodejs npm liveserver

    更新ubuntu软件源
    sudo apt-get update
    sudo apt-get install -y python-software-properties software-properties-common
    sudo add-apt-repository ppa:chris-lea/node.js
    sudo apt-get update
    安装nodejs
    sudo apt-get install nodejs
    sudo apt install nodejs-legacy
    sudo apt install npm
    更新npm的包镜像源,方便快速下载
    sudo npm config set registry https://registry.npm.taobao.org
    sudo npm config list
    全局安装n管理器(用于管理nodejs版本)
    sudo npm install n -g
    安装最新的nodejs(stable版本)
    sudo n stable
    sudo node -v
    
    
    1:安装node.js的版本控制工具nvm,在终端中执行:
    安装npm
    
    sudo apt install npm
    安装curl
    
    sudo apt install curl
    curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
    2:关闭终端后,重新进入终端,安装node
    nvm install node
    3:安装live-server:
    npm install live-server
    4:使用live-server
    在前段文件中运行
    live-server
  • 相关阅读:
    Hyperledger Fabric笔记3--BYFN启动流程分析
    Hyperledger Fabric笔记2--运行fabric测试网络
    uva1639 Candy
    uva12230Crossing Rivers
    uva1638Pole Arrangement
    uva12034Race
    uva580Critical Mass
    uva1637Double Patience
    uva11181Probability|Given
    uva1262Password
  • 原文地址:https://www.cnblogs.com/duanlinxiao/p/10202230.html
Copyright © 2011-2022 走看看