houndci / hound

Automated code review for GitHub pull requests.
https://houndci.com
MIT License
1.95k stars 401 forks source link

ESlint 8.1.0 does not work #1862

Open kgunbin opened 2 years ago

kgunbin commented 2 years ago

Hello With the .hound.yml containing

eslint:
  enabled: true
  config_file: .eslintrc.hound.yml
  ignore_file: .eslintignore
  version: 8.1.0

and package.json containing

  "engines": {
    "npm" : ">=6.0.0",
    "node" : ">=14.0.0"
  }

We get the errors like

Oops! Something went wrong! :(
ESLint: 8.1.0
TypeError: Module.createRequire is not a function
    at Object. (/home/linters/app/versions/eslint-8.1.0/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2359:26)
    at Module._compile (/home/linters/app/versions/eslint-8.1.0/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (/home/linters/app/versions/eslint-8.1.0/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
    at Object. (/home/linters/app/versions/eslint-8.1.0/node_modules/eslint/lib/cli-engine/cli-engine.js:33:5)

This indicates the outdated (before 12.2) Nodejs version used to run ESlint.

mihilbabin commented 2 years ago

I'm having the same problem after app was migrated to Node 14+

munezerobagira commented 2 years ago

How did you manage to tackle that? is it still unsolved?