Bonjour,

J'ai une erreur (sûrement dû à la configuration du package ESLint) quand je lance mon serveur node et que je n'arrive pas à résoudre.
J'ai beau essayer de réinstaller le package eslint j'ai toujours cette même erreur.

Cf erreur :

in ./src/components/AstreinteCalendar.vue

Module build failed (from ./node_modules/eslint-loader/index.js):
TypeError [ERR_INVALID_ARG_TYPE]: Cannot read config file: C:\Users\hmassicot\PB_INTRANET_2\client\node_modules\eslint\conf\eslint-recommended.js
Error: The "path" argument must be of type string. Received type object
Referenced from: C:\Users\hmassicot\PB_INTRANET_2\client\package.json
    at validateString (internal/validators.js:125:11)
    at Object.dirname (path.js:646:5)
    at module.exports.moduleId (C:\Users\hmassicot\PB_INTRANET_2\client\node_modules\import-fresh\index.js:11:36)
    at loadJSConfigFile (C:\Users\hmassicot\PB_INTRANET_2\client\node_modules\eslint\lib\config\config-file.js:159:16)
    at loadConfigFile (C:\Users\hmassicot\PB_INTRANET_2\client\node_modules\eslint\lib\config\config-file.js:214:22)
    at loadFromDisk (C:\Users\hmassicot\PB_INTRANET_2\client\node_modules\eslint\lib\config\config-file.js:523:18)
    at load (C:\Users\hmassicot\PB_INTRANET_2\client\node_modules\eslint\lib\config\config-file.js:587:20)
    at configExtends.reduceRight (C:\Users\hmassicot\PB_INTRANET_2\client\node_modules\eslint\lib\config\config-file.js:453:36)
    at Array.reduceRight (<anonymous>)
    at applyExtends (C:\Users\hmassicot\PB_INTRANET_2\client\node_modules\eslint\lib\config\config-file.js:431:26)
    at loadFromDisk (C:\Users\hmassicot\PB_INTRANET_2\client\node_modules\eslint\lib\config\config-file.js:551:22)
    at Object.load (C:\Users\hmassicot\PB_INTRANET_2\client\node_modules\eslint\lib\config\config-file.js:587:20)
    at Config.getLocalConfigHierarchy (C:\Users\hmassicot\PB_INTRANET_2\client\node_modules\eslint\lib\config.js:240:44)
    at Config.getConfigHierarchy (C:\Users\hmassicot\PB_INTRANET_2\client\node_modules\eslint\lib\config.js:192:43)
    at Config.getConfigVector (C:\Users\hmassicot\PB_INTRANET_2\client\node_modules\eslint\lib\config.js:299:21)
    at Config.getConfig (C:\Users\hmassicot\PB_INTRANET_2\client\node_modules\eslint\lib\config.js:342:29)

si quelqu'un pourrait m'aider ça serait vraiment top!

Merci d'avance, bonne fin de journée à vous!

1 réponse


Ipooo
Auteur

Mon fichier package.json :

{
  "name": "client",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "lint": "vue-cli-service lint"
  },
  "dependencies": {
    "@fullcalendar/core": "^4.1.0",
    "@fullcalendar/daygrid": "^4.1.0",
    "@fullcalendar/interaction": "^4.1.0",
    "@fullcalendar/vue": "^4.1.0",
    "axios": "^0.18.0",
    "core-js": "^2.6.5",
    "dragula": "^3.7.2",
    "moment": "^2.24.0",
    "vue": "^2.6.10",
    "vue-date-picker": "^2.5.0",
    "vue-mj-daterangepicker": "^0.1.5",
    "vue-router": "^3.0.6"
  },
  "devDependencies": {
    "@vue/cli-plugin-babel": "^3.6.0",
    "@vue/cli-plugin-eslint": "^3.6.0",
    "@vue/cli-service": "^3.6.0",
    "babel-eslint": "^10.0.1",
    "eslint": "^5.16.0",
    "eslint-plugin-vue": "^5.0.0",
    "vue-template-compiler": "^2.5.21"
  },
  "eslintConfig": {
    "root": true,
    "env": {
      "node": true
    },
    "extends": [
      "plugin:vue/essential",
      "eslint:recommended"
    ],
    "rules": {},
    "parserOptions": {
      "parser": "babel-eslint"
    }
  },
  "postcss": {
    "plugins": {
      "autoprefixer": {}
    }
  },
  "browserslist": [
    "> 1%",
    "last 2 versions",
    "not ie <= 8"
  ]
}