reactjs - 无法读取 CRA 4.0.0 中空错误的属性“范围”
问题描述
我已将 Create React App (CRA) 从 3.3.0 更新到 4.0.0,在此更新后它抛出Can not read property 'range' of null,我删除了节点模块和 yarn.lock 并再次安装了软件包,但它还没有解决。
我的 Eslint 配置文件
"env": {
"browser": true,
"es6": true
},
"parser": "babel-eslint",
"extends": [
"prettier", "prettier/react"
],
"plugins": [
"prettier", "react"
],
"parserOptions": {
"sourceType": "module"
},
"rules": {
"indent": [
"error",
2,
{ "SwitchCase": 1 }
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"single"
],
"prettier/prettier": [
"error",
{
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": true,
"trailingComma": "all"
}
],
"arrow-body-style": [
2,
"as-needed"
],
"class-methods-use-this": 0,
"lines-between-class-members": ["error", "always"] ,
"comma-dangle": [
2,
"always-multiline"
],
"import/imports-first": 0,
"import/newline-after-import": 0,
"import/no-dynamic-require": 0,
"import/no-extraneous-dependencies": 0,
"import/no-named-as-default": 0,
"import/no-webpack-loader-syntax": 0,
"import/prefer-default-export": 0,
"max-len": 0,
"newline-per-chained-call": 0,
"no-confusing-arrow": 1,
"no-console": "warn",
"no-use-before-define": 1,
"prefer-template": 2
}
}
我没有在 package.json 中添加 babel-eslint,因为它默认添加在 CRA 中。
babel-eslint 10.1.0
有人可以帮忙吗?提前致谢
解决方案
推荐阅读
- mongodb - 在 mongodb 聚合中使用 $match 后如何包含一个空数组
- android - (问) Android Studio北极狐(2020.3.1)中没有方法签名
- c++ - 如何显示地图的 k 最少和最多元素?
- python - 意外错误“数据包太大”,关闭连接 socketio flask
- python - 如何裁剪 fit.gz 文件,然后使用 Python 查看裁剪后的图像?
- extjs - 清除 ExtJS 应用程序中的缓存
- api - 使用具有令牌的 auth 使用 jmeter 进行性能测试
- python - 为什么当给定种群规模的代数增加时,超体积会减少?
- visual-studio-code - VS Code 终端中的 ESLint 不会像在编辑器中那样检测类型保护
- r - 使用 grid.arrange 显示多个格子图(来自格子)