各种报错

记录一些平时遇到的报错:

1.Uncaught ReferenceError: Invalid left-hand side in assignment

  xhr.readState == 4写成了xhr.readState =4,少写了一个符号。

2.Encoding::CompatibilityError: incompatible character encodings: GBK and UTF-8

  目录或文件名有中文。在使用sass的时候所存放的目录是中文名,改成英文名后不报错。

3.Uncaught DOMException: Blocked a frame with origin "null" from accessing a cross-origin frame.

  子框架访问父页面,存在跨源框架限制,需要放到服务器中运行。

4.db.collection is not a function:

  使用mongodb包时报的错,原因是mongodb包的版本问题。

5.provisional headers are shown:

  客户端迟迟收不到服务端的响应

6.express获取post数据时能收到请求却无法接收数据:

  请求体的解析格式未设置正确。

7. centOS 下使用wget时报错 unable to establish ssl connection

  将wget更新到最新版本

8.webpack 1.x使用extract-text-webpack-plugin插件时报错:"Chunk.entry was removed. Use hasRuntime()":

  将插件版本更新到2.1.2,并且使用时写法为:

 1 module: {
 2     rules: [
 3       {
 4         test: /\.css$/,
 5         use: ExtractTextPlugin.extract({
 6           fallback: "style-loader",
 7           use: "css-loader"
 8         })
 9       }
10     ]
11   },
12   plugins: [
13     new ExtractTextPlugin("styles.css"),
14   ]

 

posted @ 2017-10-12 20:35  法克大叔叔  阅读(590)  评论(0编辑  收藏  举报