{"id":13718767,"url":"https://github.com/ineo6/nvm","last_synced_at":"2025-05-12T21:13:28.865Z","repository":{"id":50733751,"uuid":"519976430","full_name":"ineo6/nvm","owner":"ineo6","description":"nvm安装加速教程以及镜像。","archived":false,"fork":false,"pushed_at":"2022-08-01T05:49:07.000Z","size":3304,"stargazers_count":25,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"sync","last_synced_at":"2025-05-12T21:13:19.334Z","etag":null,"topics":["mirror","nodejs","nvm"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ineo6.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-01T05:33:15.000Z","updated_at":"2025-04-14T08:30:30.000Z","dependencies_parsed_at":"2022-09-03T08:20:33.553Z","dependency_job_id":null,"html_url":"https://github.com/ineo6/nvm","commit_stats":null,"previous_names":[],"tags_count":92,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ineo6%2Fnvm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ineo6%2Fnvm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ineo6%2Fnvm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ineo6%2Fnvm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ineo6","download_url":"https://codeload.github.com/ineo6/nvm/tar.gz/refs/heads/sync","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253823462,"owners_count":21969848,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mirror","nodejs","nvm"],"created_at":"2024-08-03T01:00:37.309Z","updated_at":"2025-05-12T21:13:28.842Z","avatar_url":"https://github.com/ineo6.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Node Version Manager\n\nnvm安装加速教程以及镜像。\n\n本仓库镜像站点：[https://gitlab.com/mirrorx/nvm](https://gitlab.com/mirrorx/nvm)\n\n## 安装/更新\n\n### 脚本方式安装（简单）\n\n```sh\nexport NVM_SOURCE=https://gitlab.com/mirrorx/nvm.git\ncurl -o- https://gitlab.com/mirrorx/nvm/-/raw/master/install.sh | bash\n```\n```sh\nexport NVM_SOURCE=https://gitlab.com/mirrorx/nvm.git\nwget -qO- https://gitlab.com/mirrorx/nvm/-/raw/master/install.sh | bash\n```\n\n执行上面任一脚本后，脚本会自动把仓库检出到`~/.nvm`，然后尝试将下面的配置加入到配置文件(`~/.bash_profile`, `~/.zshrc`, `~/.profile`, 或 `~/.bashrc`)。\n\n```sh\nexport NVM_DIR=\"$([ -z \"${XDG_CONFIG_HOME-}\" ] \u0026\u0026 printf %s \"${HOME}/.nvm\" || printf %s \"${XDG_CONFIG_HOME}/nvm\")\"\n[ -s \"$NVM_DIR/nvm.sh\" ] \u0026\u0026 \\. \"$NVM_DIR/nvm.sh\" # 加载 nvm\n```\n\n### 检验安装是否成功\n\n执行以下命令:\n\n```sh\ncommand -v nvm\n```\n\n如果结果显示`nvm`则表示已经安装成功.\n\n### Git方式安装\n\n如果已经安装`git`(v1.7.10+):\n\n1. 克隆仓库到你的用户目录下\n  - `cd ~/` 然后执行 `git clone https://gitlab.com/mirrorx/nvm.git .nvm`\n1. `cd ~/.nvm`进入目录后切换到 `git checkout v0.38.0`\n1. 执行`. ./nvm.sh`激活`nvm`\n\n最后把下面内容加入到`~/.bashrc`, `~/.profile`, 或 `~/.zshrc`文件：\n\n```sh\nexport NVM_DIR=\"$HOME/.nvm\"\n[ -s \"$NVM_DIR/nvm.sh\" ] \u0026\u0026 \\. \"$NVM_DIR/nvm.sh\"  # 加载 nvm\n[ -s \"$NVM_DIR/bash_completion\" ] \u0026\u0026 \\. \"$NVM_DIR/bash_completion\"  # 加载 nvm bash_completion\n```\n\n### 手动安装\n\n```sh\nexport NVM_DIR=\"$HOME/.nvm\" \u0026\u0026 (\n  git clone https://gitlab.com/mirrorx/nvm.git \"$NVM_DIR\"\n  cd \"$NVM_DIR\"\n  git checkout `git describe --abbrev=0 --tags --match \"v[0-9]*\" $(git rev-list --tags --max-count=1)`\n) \u0026\u0026 \\. \"$NVM_DIR/nvm.sh\"\n```\n\n然后添加下面内容到`~/.bashrc`, `~/.profile`, 或 `~/.zshrc`：\n\n```sh\nexport NVM_DIR=\"$HOME/.nvm\"\n[ -s \"$NVM_DIR/nvm.sh\" ] \u0026\u0026 \\. \"$NVM_DIR/nvm.sh\" # 加载 nvm\n```\n\n### 手动升级\n\n如果已经安装`git`(v1.7.10+):\n\n```sh\n(\n  cd \"$NVM_DIR\"\n  git fetch --tags origin\n  git checkout `git describe --abbrev=0 --tags --match \"v[0-9]*\" $(git rev-list --tags --max-count=1)`\n) \u0026\u0026 \\. \"$NVM_DIR/nvm.sh\"\n```\n\n## 一些操作\n\n### 设置默认node\n\n```sh\nnvm alias default node\n```\n\n#### 设置node安装镜像\n\n```sh\nexport NVM_NODEJS_ORG_MIRROR=https://npmmirror.com/mirrors/node\nnvm install node\n\nNVM_NODEJS_ORG_MIRROR=https://npmmirror.com/mirrors/node nvm install 4.2\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fineo6%2Fnvm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fineo6%2Fnvm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fineo6%2Fnvm/lists"}