磁盘爆炸了

  1. 硬盘不够用的时候可以选择性的清理一些项目的node_modules
  2. tnpx npkill --directory ~/yourworkproject --sort path

MacOS 杀进程

  1. # 查找PID
  2. sudo lsof -i tcp:port
  3. #eg: sudo lsof -i tcp:8080
  4. # 根据进程PID杀死进程
  5. sudo kill -9 PID

查看并设置 npm 源

  1. 安装: npm i nrm -g
  2. 查看可用源: nrm ls
  3. 设置npm源: npm config set registry [url]
  4. 查看确认: npm config get registry

git 提交报错

  1. # 错误信息
  2. refusing to allow an OAuth App to create or update workflow `.github/workflows/preview.yml` without `workflow` scope
  3. # 解决方案
  4. git credential-osxkeychain erase
  5. host=github.com
  6. protocol=https

CSS 全屏旋转

  1. export const RotateStyle = {
  2. width: '100vh',
  3. height: '100vw',
  4. transform: 'rotate(90deg) translate(0, -100vh)',
  5. transformOrigin: 'top left',
  6. };

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/

一行命令查看系统信息

  1. npx envinfo --system --binaries --browsers

浏览器兼容性测试

http://f2etest.alibaba-inc.com/