react-native - 原子中的 Npm 安装集会编码 eslint 不起作用
问题描述
我已经在 atom 中安装了 linter 和 linter-eslint 插件。但是安装 eslint rallycoding 会带来麻烦。可能是什么问题,我无法弄清楚。
以下是错误信息:
E:\zreactNative\test\ReduxTest>npm install --save-dev eslint-config-rallycoding
npm WARN deprecated eslint-plugin-class-property@1.1.0: please use eslint-plugin-babel and babel/semi
npm ERR! Unexpected end of JSON input while parsing near '...2.0","esutils":"^2.0.'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\bbeck\AppData\Roaming\npm-cache\_logs\2018-09-25T07_13_26_749Z-debug.log
2018-09-25T07_13_26_749Z-debug.log
包.json:
{
"name": "ReduxTest",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.3.1",
"react-native": "0.55.4",
"react-native-elements": "^0.19.1",
"react-native-vector-icons": "^5.0.0",
"react-redux": "^5.0.7",
"redux": "^4.0.0"
},
"devDependencies": {
"babel-jest": "23.4.2",
"babel-preset-react-native": "4.0.0",
"eslint-plugin-babel": "^5.2.0",
"jest": "23.5.0",
"react-test-renderer": "16.3.1"
},
"jest": {
"preset": "react-native"
}
}
解决方案
解决了。这是 npm 的问题。npm cache clean --force 可以解决问题。
推荐阅读
- python - Python 交互窗口发生了什么?
- vhdl - 将 txt 文件读取到 vhdl 中的数组
- sql - 如何从一个相互依赖于另一个表的表中获取计数
- c# - 测试广告显示在应用程序上,但真实广告不显示
- selenium - 硒查找元素xpath
- java - Micronaut 单元测试:需要澄清 @MicronautTest
- firebase - angularfire2 找不到模块'@angular/fire'
- java - 我无法使用 appium 在真实设备上启动我的应用程序。想要启动 CAlculator
- c# - 从 DataTable 中查找每行的大小
- angular - ActivatedRoute 显示为空