NPM安装Atom中的拉力赛代码eslint不起作用

时间:2018-09-25 07:24:31

标签: react-native atom-editor 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

package.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"
  }
}

1 个答案:

答案 0 :(得分:0)

解决了。这是npm的问题。 npm cache clean --force可以解决问题。