yarn更换为淘宝镜像

全局设置npm采用淘宝镜像

npm config set registry https://registry.npm.taobao.org

安装yarn

npm install yarn -g

多版本切换

npm install n -g
n lts
node -v

查看下载源

yarn config get registry

更换为淘宝源

yarn config set registry https://registry.npm.taobao.org

初始化项目

yarn init -y

安装webpack

yarn add webpack

安装webpack到dev

yarn add webpack -D

更新到最新的

yarn upgrade webpack

安装项目里的依赖

yarn install

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax

*

code