在Windows上安装npm(Node.js程序包管理器)(不使用Node.js MSI) [英] Install npm (Node.js Package Manager) on Windows (w/o using Node.js MSI)

查看:95
本文介绍了在Windows上安装npm(Node.js程序包管理器)(不使用Node.js MSI)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题:使用nvm安装Node.js时,我能够安装所需的Node.js版本,但是nvm不会自动安装npm. NPM的页面不提供有关安装的信息.我自己不是Windows用户,我完全不知所措...

The problem: while using nvm to install Node.js I was able to install the version of Node.js I need, but nvm does not install npm automatically. NPM's page provides no information about installing it. Being not much of a Windows user myself I am completely at a loss...

Google的每个结果似乎都使用Node.js MSI安装程序来使其正常工作-在我看来,这不是一个选择.那么,我该怎么办?

Every result in Google seems to use Node.js MSI installer to get that working - which is not an option in my case. So, how do I?

推荐答案

要在Windows上安装npm,只需解压缩npm 存档节点在哪里.有关更多详细信息,请参见文档.

To install npm on windows just unzip the npm archive where node is. See the docs for more detail.

npm随节点一起提供,这就是安装它的方式. nvm仅用于更改节点版本,而不安装npm.使用npm和nvm的一种更清洁的方法是,首先按原样安装节点(使用npm),然后通过npm install nvm

npm is shipped with node, that is how you should install it. nvm is only for changing node versions and does not install npm. A cleaner way to use npm and nvm is to first install node as it is (with npm), then install the nvm package by npm install nvm

这篇关于在Windows上安装npm(Node.js程序包管理器)(不使用Node.js MSI)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆