一、背景
最近新接手了一个老项目,在启动项目阶段遇到了安装node-sass依赖的问题,这里简单记录下解决方案。
二、执行npm install node-sass时发生了什么?
- 如果本地有缓存命中,则安装本地缓存
- npm 拉下 node-sass包
- 根据node版本,从github下载对应的binding.node编译器
- 如果下载编译器失败或github没有对应node版本的编译器资源则尝试本地编译
- 使用python2进行本地编译
1 | Charles is an HTTP proxy / HTTP monitor / Reverse Proxy that enables a developer to view all of the HTTP and SSL / HTTPS traffic between their machine and the Internet. This includes requests, responses and the HTTP headers (which contain the cookies and caching information). |
Charles是移动端开发时候比较常见的抓包工具:
Web调试代理工具
可用于Http/Https接口获取Request/Reponse信息
可用于手机抓包