拿到新MAC,开始下载前端需要的工具:
1、VScode
安装一些插件(gitLens, vetur,.....)
进行setting.json设置
2、Item2
3、node
4、谷歌插件vue-devtools
(下载)
安装完成后,打开终端Item2,
1、安装软件包的管理器Homebrew安装地址
2、安装wget brew install wget
3、安装 Oh My Zsh是一款社区驱动的命令行工具,它基于zsh命令行,提供了主题配置,插件机制,已经内置的便捷操作。
sh -c "$(curl -fsSL https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh)"
或者
wget方式
sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
4、丰富git log显示信息
git config --global alias.hist 'log --pretty=format:"%C(auto)%h %ad | %C(auto)%s%d %Cblue(%an)" --graph --date=short'
5、git设置用户名和邮箱
git config --global user.name "zengjinlong"
#--global表明本机的所有git仓库均使用该配置
git config --global user.email "zengjinlong@xunlei.com"
实际操作遇到问题:
1、node版本过高,不稳定,需要降低版本
1)可以直接官网下载低版本进行安装
2)借助node版本管理模块n
2、依赖包问题,需要重新安装
image.png
不用回退node版本,而是升级node-sass
npm uninstall --save node-sass
npm cache clean -f //清缓存
npm install --save node-sass
或者
npm install node-sass@12.2.2 //指定版本
3、warning: unable to access '/Users/xxxx(your username)/.config/git/attributes': Permission denied
查看各文件权限明细
ls -al
image.png
如果有只在root下读写的需要修改权限。
没有的话,
sudo chown -R username(此处替换你的用户名称) /Users/xxxx(your username)/.config