Code Monkey home page Code Monkey logo

stu-node's Introduction

Node.js学习记录

本地环境搭建

通过官网下载安装包安装

使用包管理工具

nvm

// 设置国内镜像源,可以加快安装速度
nvm node_mirror https://npmmirror.com/mirrors/node/
// 安装指定版本的node
nvm install vx.x.x
// 查看已安装的node版本
nvm ls
// 切换node版本
nvm use vx.x.x

fnm

// 安装chcalatey
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
// 安装fnm
choco install fnm
  • 配置环境变量,推荐使用git bash
eval "$(fnm env --use-on-cd)

示例

  • fnm命令集合
// 设置国内镜像源
export FNM_NODE_DIST_MIRROR="https://npmmirror.com/mirrors/node"
// 安装node
// 先将要安装的node版本记录下来
echo 18.16.0 >.node-version
// 执行安装
fnm install
// 查看已安装的版本
fnm list
// 切换node版本
fnm use x.x.x

volta

// 安装node
volta install [email protected]
// 查看已安装的版本
volta list node
// 切换版本(同安装命令,已存在的版本不会重复安装)
volta install [email protected]
  • 设置项目默认版本,也可以为某个项目设置要使用的版本 (相关配置会自动添加到 package.json 文件中)。

stu-node's People

Contributors

daishoulun avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.