码农知识堂 - 1000bd
  •   Python
  •   PHP
  •   JS/TS
  •   JAVA
  •   C/C++
  •   C#
  •   GO
  •   Kotlin
  •   Swift
  • archlinux 上使用 nvm 来管理npm版本


    archlinux 上使用 nvm 来管理 npm 版本

    nvm-github

    Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions

    1. 安装 nvm

    sudo pacman -S nvm
    
    • 1

    不知道为什么使用pacman安装的nvm,是找不到命令的,所以我还是使用脚本安装。

    使用脚本安装

    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
    
    • 1

    Running either of the above commands downloads a script and runs it. The script clones the nvm repository to ~/.nvm, and attempts to add the source lines from the snippet below to the correct profile file (~/.bash_profile, ~/.zshrc, ~/.profile, or ~/.bashrc).

    2. nvm的基础使用

    To download, compile, and install the latest release of node, do this:

    nvm install node # "node" is an alias for the latest version
    
    • 1

    To install a specific version of node:

    nvm install 14.7.0 # or 16.3.0, 12.22.1, etc
    
    • 1

    And then in any new shell just use the installed version:

    nvm use node
    
    • 1

    Or you can just run it:

    nvm run node --version
    
    • 1

    Or, you can run any arbitrary command in a subshell with the desired version of node:

    nvm exec 4.2 node --version
    
    • 1

    You can also get the path to the executable to where it was installed:

    nvm which 12.22
    
    • 1

    2.2. List version

    If you want to see what versions are installed:

    nvm ls
    
    • 1

    If you want to see what versions are available to install:

    nvm ls-remote
    
    • 1
  • 相关阅读:
    vite打包失败 - out of memory
    Ubuntu系统下使用apt-get安装Mysql8
    校园邮箱-注册
    Multi-Grade Deep Learning for Partial Differential Equations
    振南技术干货集:比萨斜塔要倒了,倾斜传感器快来!(1)
    【Java】面向对象程序设计 基础语法笔记
    再次登顶 GitHub,阿里大牛用 758 页讲清微服务 K8S 响应式的文案,真的太香了
    网络安全(黑客技术)—2024自学手册
    智加科技与东风柳汽达成深度合作 自动驾驶重卡计划2024年初量产交付
    Java实现 数组匹配,矩阵行排序
  • 原文地址:https://blog.csdn.net/Leiyi_Ann/article/details/126639813
  • 最新文章
  • 攻防演习之三天拿下官网站群
    数据安全治理学习——前期安全规划和安全管理体系建设
    企业安全 | 企业内一次钓鱼演练准备过程
    内网渗透测试 | Kerberos协议及其部分攻击手法
    0day的产生 | 不懂代码的"代码审计"
    安装scrcpy-client模块av模块异常,环境问题解决方案
    leetcode hot100【LeetCode 279. 完全平方数】java实现
    OpenWrt下安装Mosquitto
    AnatoMask论文汇总
    【AI日记】24.11.01 LangChain、openai api和github copilot
  • 热门文章
  • 十款代码表白小特效 一个比一个浪漫 赶紧收藏起来吧!!!
    奉劝各位学弟学妹们,该打造你的技术影响力了!
    五年了,我在 CSDN 的两个一百万。
    Java俄罗斯方块,老程序员花了一个周末,连接中学年代!
    面试官都震惊,你这网络基础可以啊!
    你真的会用百度吗?我不信 — 那些不为人知的搜索引擎语法
    心情不好的时候,用 Python 画棵樱花树送给自己吧
    通宵一晚做出来的一款类似CS的第一人称射击游戏Demo!原来做游戏也不是很难,连憨憨学妹都学会了!
    13 万字 C 语言从入门到精通保姆级教程2021 年版
    10行代码集2000张美女图,Python爬虫120例,再上征途
Copyright © 2022 侵权请联系2656653265@qq.com    京ICP备2022015340号-1
正则表达式工具 cron表达式工具 密码生成工具

京公网安备 11010502049817号