javascript - windows下安装node.js和cnpm
PHP中文网
PHP中文网 2017-04-17 16:36:45
0
4
618

node.js配置环境这块卡了两个月一直没弄明白
1 装完node.js 用npm下载包,半天没反应不知道是不是网速问题。用cnpm?会好些?
2 现在node.js自动集成了npm,如何用cnpm替换npm? 需要用国内的node.js镜像替换node.js吗?
3 每次下载完node.js之后就会查看版本号和npm版本号然后就不知道干什么了,网上的教程不是让我装什么linux就是让我装linux。(没linux基础)
4 不是不想看文档资料视频,两个月看了各种资料越看越迷糊

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(4)
刘奇

cnpm is just a domestic mirror of npm, as explained on the official website.

The more convenient way is to install something called cnpm. It still needs to be installed through npm. After installation, you can use the cnpm command to install other packages.

npm install -g cnpm --registry=https://registry.npm.taobao.org

I think you may not understand what node.js is. In fact, nodeJs is a runtime library, similar to java's jdk. After installing it on the system and configuring the environment variables, you can run the node program on the command line. The function of the runtime library is to provide an interface that can interact with the operating system and shield the differences between operating systems, so that the language can be cross-platform.

npm is just the official package manager of node. To put it simply, it is an application market where you can easily download and install open source software. Due to indescribable reasons in China, npm’s official server connectivity rate is relatively poor, so cnpm was born. Domestic mirroring for everyone’s convenience.

小葫芦

1. It can also be understood as a problem of network speed. It is faster to climb over the wall, or it is so fast to use cnpm.
2. To use cnpm, you must first download cnpm. Taobao mirror first install cnpm. The specific method is http:// npm.taobao.org/
3.npm is just a package management tool. You can install whatever you use. There is no need to install useless things
4. You have to look at it with purpose. To learn nodejs, you should learn to use npm packages. Then choose the appropriate information to view

洪涛

You can consider using nrm

npm install -g nrm --registry=https://registry.npm.taobao.org

https://github.com/Pana/nrm
Use nrm to switch npm sources.

大家讲道理

cnpm is not recommended, it is recommended to use vpn. Some npm modules have dependencies and you will use npm to install them. If you use cnpm to install these dependencies, it is easy to fail and the installation error will not be reported, which is a hidden danger.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template