磁盘爆炸了
硬盘不够用的时候可以选择性的清理一些项目的node_modules
tnpx npkill --directory ~/yourworkproject --sort path
MacOS 杀进程
# 查找PID
sudo lsof -i tcp:port
#eg: sudo lsof -i tcp:8080
# 根据进程PID杀死进程
sudo kill -9 PID
查看并设置 npm 源
安装: npm i nrm -g
查看可用源: nrm ls
设置npm源: npm config set registry [url]
查看确认: npm config get registry
git 提交报错
# 错误信息
refusing to allow an OAuth App to create or update workflow `.github/workflows/preview.yml` without `workflow` scope
# 解决方案
git credential-osxkeychain erase
host=github.com
protocol=https
CSS 全屏旋转
export const RotateStyle = {
width: '100vh',
height: '100vw',
transform: 'rotate(90deg) translate(0, -100vh)',
transformOrigin: 'top left',
};
export default 和 export { X as default } 的区别
https://jakearchibald.com/2021/export-default-thing-vs-thing-as-default/
How to Cancel Pending API Requests to Show Correct Data
https://css-tricks.com/how-to-cancel-pending-api-requests-to-show-correct-data/
一行命令查看系统信息
npx envinfo --system --binaries --browsers