运行ESLint时出错

时间:2017-09-28 17:24:06

标签: node.js npm eslint

我正在开发一个在提交PR之前使用ESLint的开源项目,听起来像一个非常标准的程序,唯一的问题是在运行ESLint时npm run lint我收到错误

Cannot find module '\webpack\dlls\vendor.json'

我最近卸载了节点并安装了nvm-windows,目前正在使用node 6.11.2npm 3.10.10。任何帮助都会非常感激,因为我在谷歌上找不到任何东西。

的package.json

`

{
  "name": "Mantenuto",
  "description": "",
  "version": "0.0.1",
  "engines": {
    "node": "6.11.2",
    "npm": "5.2.0"
  },
  "keywords": [
    "react",
    "isomorphic",
    "universal",
    "webpack",
    "express",
    "hot reloading",
    "react-hot-reloader",
    "redux",
    "starter",
    "boilerplate",
    "babel"
  ],
  "main": "bin/server.js",
  "scripts": {
    "start": "concurrently --kill-others \"npm run start-prod\"",
    "start-prod": "better-npm-run start-prod",
    "build": "better-npm-run build",
    "build-dlls": "webpack --verbose --colors --display-error-details --config webpack/vendor.config.js",
    "postinstall": "concurrently \"npm run build\" \"npm run build-dlls\"",
    "lint": "node_modules/.bin/eslint -c .eslintrc src",
    "start-dev": "better-npm-run start-dev",
    "start-dev-local": "better-npm-run start-dev-local",
    "start-dev-server-debug": "better-npm-run start-dev-server-debug",
    "watch-client": "better-npm-run watch-client",
    "start-dev-debug": "better-npm-run start-dev-debug",
    "start-dev-debug-local": "better-npm-run start-dev-debug-local",
    "debug": "concurrently --kill-others \"npm run watch-client\" \"npm run start-dev-debug\"",
    "debug-local": "concurrently --kill-others \"npm run watch-client\" \"npm run start-dev-debug-local\"",
    "dev": "concurrently --kill-others \"npm run watch-client\" \"npm run start-dev\"",
    "dev-local": "concurrently --kill-others \"npm run watch-client\" \"npm run start-dev-local\"",
    "test": "jest $(find src -name '*.test.js')",
    "tdd": "jest --watch $(find src -name '*.test.js')",
    "debug-tests": "node --inspect-brk node_modules/.bin/jest --runInBand --watch $(find src -name '*.test.js')"
  },
  "betterScripts": {
    "start-prod": {
      "command": "node ./bin/server.js",
      "env": {
        "NODE_PATH": "./src",
        "NODE_ENV": "production",
        "HOST": "localhost",
        "API_ENDPOINT": "https://api.projectrefit.us"
      }
    },
    "start-dev": {
      "command": "node ./bin/server.js",
      "env": {
        "NODE_PATH": "./src",
        "NODE_ENV": "development",
        "HOST": "localhost",
        "API_ENDPOINT": "https://api.projectrefit.us",
        "PORT": 3000,
        "WEBPACK_DLLS": 1
      }
    },
    "start-dev-local": {
      "command": "node ./bin/server.js",
      "env": {
        "NODE_PATH": "./src",
        "NODE_ENV": "development",
        "HOST": "localhost",
        "PORT": 3000,
        "API_ENDPOINT": "http://localhost:3030",
        "WEBPACK_DLLS": 1
      }
    },
    "start-dev-debug": {
      "command": "node --inspect --debug ./bin/server.js",
      "env": {
        "NODE_PATH": "./src",
        "NODE_ENV": "development",
        "HOST": "localhost",
        "API_ENDPOINT": "https://api.projectrefit.us",
        "PORT": 3000,
        "WEBPACK_DLLS": 1
      }
    },
    "start-dev-debug-local": {
      "command": "node --inspect --debug ./bin/server.js",
      "env": {
        "NODE_PATH": "./src",
        "NODE_ENV": "development",
        "HOST": "localhost",
        "API_ENDPOINT": "http://localhost:3030",
        "PORT": 3000,
        "WEBPACK_DLLS": 1
      }
    },
    "watch-client": {
      "command": "node webpack/webpack-dev-server.js",
      "env": {
        "UV_THREADPOOL_SIZE": 100,
        "NODE_PATH": "./src",
        "PORT": 3000,
        "APIPORT": 3030,
        "WEBPACK_DLLS": 1
      }
    },
    "build": {
      "command": "webpack --verbose --colors --display-error-details --config webpack/prod.config.js",
      "env": {
        "NODE_ENV": "production"
      }
    }
  },
  "jest": {
    "moduleDirectories": [
      "node_modules",
      "src"
    ],
    "globals": {
      "__CLIENT__": true,
      "__SERVER__": false,
      "__DEVELOPMENT__": true,
      "__DEVTOOLS__": false,
      "__DLLS__": "process.env.WEBPACK_DLLS === '1'"
    },
    "moduleNameMapper": {
      "\\.(css|scss|eot|otf|svg|ttf|woff|woff2|m4a|aac|oga)$": "identity-obj-proxy",
      "\\.(jpg|jpeg|gif|png|mp4|mkv|avi|webm|swf|wav|mid)$": "jest-static-stubs/$1"
    }
  },
  "dependencies": {
    "async": "^2.4.1",
    "babel-core": "^6.25.0",
    "babel-plugin-add-module-exports": "^0.2.1",
    "babel-plugin-transform-decorators-legacy": "^1.3.4",
    "babel-plugin-transform-object-assign": "^6.22.0",
    "babel-plugin-transform-react-display-name": "^6.25.0",
    "babel-plugin-transform-runtime": "^6.23.0",
    "babel-polyfill": "^6.23.0",
    "babel-preset-es2015": "^6.24.1",
    "babel-preset-react": "^6.24.1",
    "babel-preset-stage-0": "^6.24.1",
    "babel-register": "^6.24.1",
    "babel-runtime": "^6.23.0",
    "body-parser": "^1.17.2",
    "compression": "^1.6.2",
    "concurrently": "^3.5.0",
    "cookie-parser": "^1.4.3",
    "domkit": "github:hdngr/domkit",
    "express": "^4.14.0",
    "express-session": "^1.15.3",
    "feathers": "^2.1.4",
    "feathers-authentication-client": "^0.3.2",
    "feathers-authentication-hooks": "^0.1.4",
    "feathers-authentication-jwt": "^0.3.2",
    "feathers-authentication-local": "^0.4.3",
    "feathers-errors": "^2.8.1",
    "feathers-hooks": "^2.0.2",
    "feathers-hooks-common": "^3.5.5",
    "feathers-memory": "^1.1.0",
    "feathers-rest": "^1.7.3",
    "feathers-socket-commons": "^2.4.0",
    "feathers-socketio": "^2.0.0",
    "fs": "0.0.1-security",
    "history": "^3.0.0",
    "http-proxy": "^1.16.2",
    "is-promise": "^2.1.0",
    "js-cookie": "^2.1.4",
    "jsonwebtoken": "^7.4.1",
    "localstorage-memory": "^1.0.2",
    "lodash.isplainobject": "^4.0.6",
    "lru-memoize": "^1.0.2",
    "morgan": "^1.8.2",
    "multireducer": "^3.1.0",
    "pretty-error": "^2.1.1",
    "prop-types": "^15.5.10",
    "react": "^15.6.1",
    "react-bootstrap": "^0.30.10",
    "react-cookie": "^0.4.9",
    "react-dom": "^15.6.1",
    "react-helmet": "^3.3.2",
    "react-redux": "^4.4.8",
    "react-router": "^3.0.5",
    "react-router-bootstrap": "^0.23.3",
    "react-router-redux": "^4.0.8",
    "react-router-scroll": "^0.4.2",
    "react-spinners": "0.0.30",
    "redux": "^3.7.0",
    "redux-connect": "^3.0.0",
    "redux-form": "^6.8.0",
    "redux-persist": "^4.4.0",
    "redux-thunk": "^2.2.0",
    "serialize-javascript": "^1.3.0",
    "serve-favicon": "^2.4.3",
    "socket.io-client": "^1.7.4",
    "superagent": "^3.5.2",
    "webrtc-adapter": "^4.2.1"
  },
  "devDependencies": {
    "autoprefixer-loader": "^3.2.0",
    "babel-eslint": "^7.2.3",
    "babel-jest": "^17.0.2",
    "babel-loader": "^6.4.1",
    "babel-plugin-typecheck": "^3.9.0",
    "babel-preset-airbnb": "^2.4.0",
    "babel-preset-es2017": "^6.24.1",
    "better-npm-run": "0.0.11",
    "bootstrap-sass": "^3.3.7",
    "bootstrap-sass-loader": "^1.0.10",
    "chai": "^3.5.0",
    "clean-webpack-plugin": "^0.1.16",
    "css-loader": "^0.26.4",
    "enzyme": "^2.9.1",
    "eslint": "^4.7.0",
    "eslint-config-airbnb": "^15.1.0",
    "eslint-import-resolver-webpack": "^0.8.3",
    "eslint-loader": "^1.8.0",
    "eslint-plugin-chai-friendly": "^0.4.0",
    "eslint-plugin-import": "^2.7.0",
    "eslint-plugin-jsx-a11y": "^5.1.1",
    "eslint-plugin-react": "^7.3.0",
    "extract-text-webpack-plugin": "^1.0.1",
    "file-loader": "^0.9.0",
    "font-awesome": "^4.7.0",
    "font-awesome-webpack": "0.0.4",
    "happypack": "^3.1.0",
    "html-webpack-plugin": "^2.28.0",
    "identity-obj-proxy": "^3.0.0",
    "jest": "^17.0.3",
    "jest-static-stubs": "0.0.1",
    "json-loader": "^0.5.4",
    "less": "^2.7.2",
    "less-loader": "^2.2.3",
    "lighthouse": "^1.6.5",
    "mocha": "^3.4.2",
    "node-sass": "^3.13.1",
    "piping": "^1.0.0-rc.4",
    "react-a11y": "^0.3.4",
    "react-addons-test-utils": "^15.6.0",
    "react-hot-loader": "^3.0.0-beta.7",
    "react-to-html-webpack-plugin": "^2.2.0",
    "redux-devtools": "^3.4.0",
    "redux-devtools-dock-monitor": "^1.1.2",
    "redux-devtools-log-monitor": "^1.3.0",
    "sass-loader": "^4.1.1",
    "socket.io": "^1.7.4",
    "strip-loader": "^0.1.2",
    "style-loader": "^0.13.2",
    "sw-precache-webpack-plugin": "^0.6.3",
    "timekeeper": "^0.1.1",
    "url-loader": "^0.5.9",
    "webpack": "^1.15.0",
    "webpack-dev-middleware": "^1.11.0",
    "webpack-hot-middleware": "^2.18.0",
    "webpack-isomorphic-tools": "^2.6.6"
  }
}

`

npm run lint

"lint": "node_modules/.bin/eslint -c .eslintrc src"

0 个答案:

没有答案