报错处理(收集)

92 阅读1分钟

报错处理(收集)

@1, vue axios 报错 Uncaught (in promise) TypeError: Cannot convert undefined or null to object at Function.keys () at mergeConfig (axios.js:1308)

问题:在 VUE 3.0.4 版本,使用 axios 时报错
Uncaught (in promise) TypeError: Cannot convert undefined or null to object     at Function.keys ()     at mergeConfig (axios.js:1308)

解决方案:

重新安装 axios:

npm install axios@0.21 --save

@2. vuecli3 无法启动项目 报错:core-js/modules/es.object.to-string in......

解决:
vscode先ctrl+c停止运行
按照提示:npm install --save core-js 安装
或者 安装 npm install core-js@3 -save-dev

重启 npm run serve 启动成功

@3.nodemon : 无法加载文件 C:\Users\Administrator\AppData\Roaming\npm\nodemon.ps1因为在此系统上禁止运行脚本。

解决方法:

1.window+r 输入powershell
2.执行:set-ExecutionPolicy RemoteSigned

在这里插入图片描述 ​3、查看执行策略:get-ExecutionPolicy

@ 4.安装postman失败,跳转到安装.net framework

今天在安装postman时,一直跳转到安装.net framework,每次安装都会失败。
原因是.net framework版本太低,需先升级.net framework再安装postman..net framework

下载地址:www.microsoft.com/en-us/downl…

@ 5 .使用node+express搭建服务器连接mongodb写后端登录的时候,postman测试返回值为登录成功了,终端也打印出来name和pass,但为什么还报错
Cannot set headers after they are sent to the client
  • 报错翻译 :将请求头发送到客户端后无法设置请求头
  • 原因 :客户端发送一次请求的时候,服务器端给出了多次响应
  • 解决办法 :在你的每次响应后添加return,避免多余响应。