[持续更新]开发中常见问题记录
- 时间:2023-11-03 04:49:59
- 194人已阅读
1、fatal: unable to access 'xxxxx.git/': SSL certificate problem: unable to get local issuer certificate
解决方法:
git config --global http.sslVerify false
2、cnpm : 无法加载文件 C:\Users\97624\AppData\Roaming\npm\cnpm.ps1,因为在此系统上禁止运行脚本。
解决方法:
- 首先,以管理员身份运行 Windows PowerShell
- 然后,输入命令 set-ExecutionPolicy RemoteSigned 更改执行策略。
- 最后,输入 Y, 执行更改策略。 参考链接:https://blog.csdn.net/weixin_43252521/article/details/121874239
3、生成ssh密钥
ssh-keygen -t rsa -C "your_email@youremail.com"
查看详细教程
4、生成密钥和设置密码后提示:fatal:unable to access 'xxxxxxxxx'
尝试敲入命令:git config --global http.sslVerify false
5、修改github或者是github的密码之后,客户端如何修改
当密码被修改了之后,本地执行命令git pull 会报fatal: Authentication failed for... 查看详细教程
6、cnpm
npm install -g cnpm --registry=https://registry.npm.taobao.org
此方法只适用于2022-06-30日之前,原淘宝npm域名即将停止解析。
http://npm.taobao.org 和 http://registry.npm.taobao.org
将在 2022.06.30 号正式下线和停止 DNS 解析。
域名切换规则:
http://npm.taobao.org => http://npmmirror.com
http://registry.npm.taobao.org => http://registry.npmmirror.com
7、Git密钥生成以及Gitlab配置
8、Git下载国内镜像地址
9、国内下载vscode速度缓慢
10、下载node-sass 报错
Win10 搭建本地开发环境node项目记录,解决gyp
failed with exit code: 1和node-sass安装失败问题(传送门)
windows-build-tools 安装卡住无法安装的解决方法 (传送门)
11、.NET Framework各版本汇总以及之间的关系以及下载地址
12、el-table使用v-show失效,使用v-if 导致切换时数据串行
解决方法:不使用v-show 使用v-if 的时候加上 :key="Math.random()" 实质上就是使用el-table-column 不能知道这个是不是唯一,所以导致串行。加上key之后就会保证el-table-column是唯一的。就不会导致串行的问题了。
13、vue 出现 ==Error in v-on handler: "RangeError: Maximum call stack size exceeded"==错误
出现的原因就是自己调用了自己,程序进入了死循环仔细检查代码--比较常见出现的地方,函数内部调用,路由重定项到了自己头上。
14、Do not use built-in or reserved HTML elements as component id: details 不要将内置或保留的HTML元素用作组件id:details
传送门罗列了html中的所有标签以及含义
15、vue清空当前页面地址栏的传参
this.$router.push({ query: {} });
16、js clientX、offsetX、screenX、pageX、x的讲解
17、js判断属性是否存在
{{orderInfo.payChannel!==undefined ? payTypeList[orderInfo.payChannel] : '--' }}
18、设置浏览器允许跨域
- 设置浏览器允许跨域 --disable-web-security --user-data-dir=C:\Users\97624\Desktop\常用文件\浏览器跨域文件夹
19、https中使用http资源被阻止
// 报错信息
Mixed Content: The page at 'https://example.com' was loaded over HTTPS, but requested an insecure stylesheet 'http://example.com/static/css/example.css'. This request has been blocked; the content must be served over HTTPS.
解决方法:
- 将http改成https
- 添加meta属性
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
- nginx添加配置
server {
...
location / {
...
add_header Content-Security-Policy upgrade-insecure-requests;
...
}
}
上一篇:记录网站被黑的一次经历
下一篇:centeros初始化