通用
查看镜像源
npm
1.查看当前npm信息
npm -v
1
2.查看当前的镜像源
npm config get registry
1
3.修改当前的镜像源为淘宝镜像源
registry https://registry.npm.taobao.org弃用
npm config set registry https://registry.npmmirror.com
1
修改为官方镜像
npm config set registry https://registry.npmjs.org/
1
4.修改完后再次通过命令2查看
node版本
前端开发环境搭建踩坑笔记——npm install node-sass安装失败的解决方案 - 知乎
node-sass安装失败解决方法总结(终有一款适合你)_node.js_脚本之家
deepin
安装 nvm来管理node版本
安装nvm
最好就是去github搜索nvm,点击最多星星的进去,获取最新的地址(raw.githubusercontent.com有可能访问不了导致下载失败,请自行科学上网)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
无法翻墙的
参考链接:Linux—nvm教程_linux nvm-CSDN博客
1
打开命令行工具
这里要主要的是,你需要把nvm配置在哪个用户上,是个人用户还是root用户(自行切换,这里使用root)
如果没有 .bash_profile
### 创建一个新文件.bash_profile
touch .bash_profile
使用vim编辑该文件
vim .bash_profile
复制以下内容进去(不要问我vim怎么复制粘贴保存退出)
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
执行以下命令,让该配置立即生效
source ~/.bash_profile
1
ps:如果提示该文件不存在,请检测下是在哪个用户下创建的.bash_profile文件。在root用户下安装的话只能是root有效,其他账号是无效的
安装node
通过 nvm 安装npm
nvm off // 禁用node.js版本管理(不卸载任何东西)
nvm on // 启用node.js版本管理
nvm install <version> // 安装node.js的命名 version是版本号 例如:nvm install 8.12.0
nvm uninstall <version> // 卸载node.js是的命令,卸载指定版本的nodejs,当安装失败时卸载使用
nvm ls // 显示所有安装的node.js版本
nvm list available // 显示可以安装的所有node.js的版本
nvm use <version> // 切换到使用指定的nodejs版本
nvm v // 显示nvm版本
nvm install stable // 安装最新稳定版
注意:配置多版本node时 后装的会自动替换掉 可以手动变更
nvm use <version> // 切换到使用指定的nodejs版本
Git安装
npm install git -g
$ git config --global user.name 用户命
$ git config --global user.name freedom
$ git config --global user.password 密码
$ git config --global user.password abc0506abc
$ git config --global user.password 邮箱
$ git config --global user.email “1548429568@qq.com”
vscode另外配置:
git config --global credential.helper store
在deepin20中使用git步骤_deepin git_chc_office的博客-CSDN博客
Vue全家桶安装
随便搜个
node命令
netstat -tunlp 查看端口 然后去任务管理器中关强制关闭端口
禁用鼠标中键
1、禁用中键功能
在终端输入如下命令即可:
xmodmap -e "pointer = 1 25 3 4 5 6 7 2"
2、恢复中键功能
在终端输入如下命令即可:
xmodmap -e "pointer = 1 2 3 4 5 6 7 8"