后浪笔记一零二四

yarn

npm

npm config set cache “D:\software\nodejs\npm_cache”

npm config set prefix “D:\software\nodejs\npm_global”

npm config set registry http://mirrors.cloud.tencent.com/npm/

yarn

npm install -g yarn

yarn config set registry http://mirrors.cloud.tencent.com/npm/

查看bin目录: yarn global bin

修改bin目录: yarn config set prefix “D:\software\nodejs\yarn_global”

查看cache目录: yarn cache dir

修改cache目录: yarn config set cache-folder “D:\software\nodejs\yarn_cache”

查看全局包目录: yarn global dir

修改全局包目录: yarn config set global-folder “D:\software\nodejs\yarn_global\global”

安装package.json里的所有包,并将包及它的所有依赖项保存进yarn.lock: yarn install

局部安装,也就是将包下载到项目的node_modules目录下,并自动更新到package.json和yarn.lock文件: yarn add 包名

全局安装,也就是将包下载到global-folder目录下,并自动更新到package.json和yarn.lock文件: yarn global add 包名

卸载局部包: yarn remove 包名

卸载全局包: yarn global remove 包名

运行package.json文件中script属性内定义的脚本: yarn run 脚本

npx browserslist@latest –update-db 报错了

Error: error:0308010C:digital envelope routines::unsupported

Enable legacy OpenSSL provider:

On unix-like system: export NODE_OPTIONS=–openssl-legacy-provider

on windows cmd: set NODE_OPTIONS=–openssl-legacy-provider

on powershell: $env:NODE_OPTIONS = “–openssl-legacy-provider”


专题:

本文发表于 2019-06-17,最后修改于 2019-06-17。

本站永久域名「 jiavvc.top 」,也可搜索「 后浪笔记一零二四 」找到我。


上一篇 « react 下一篇 » javascript

赞赏支持

请我吃鸡腿 =^_^=

i ysf

云闪付

i wechat

微信

推荐阅读

Big Image