Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

589
Views
ERR undefined while installing airbnb eslint
npx install-peerdeps --dev eslint-config-airbnb
install-peerdeps v3.0.3
Installing peerdeps for eslint-config-airbnb@latest.
npm install eslint-config-airbnb@18.2.1 eslint@^7.2.0 eslint-plugin-import@^2.22.1 eslint-plugin-jsx-a11y@^6.4.1 eslint-plugin-react@^7.21.5 eslint-plugin-react-hooks@^1.7.0 --save-dev

ERR undefined

idk what's that. Already tried to reinstall node(both LTS and current). The path variable is valid.

over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

I resolved this by explicitly installing the dependent npm packages i.e. npm install [package]@[version] --save-dev rather than using the npx install-peerdeps shortcut.

The npm package page for eslint-config-airbnb details how to list the dependencies using: npm info "eslint-config-airbnb@latest" peerDependencies

For version 18.2.1 this gave:

{
  eslint: '^5.16.0 || ^6.8.0 || ^7.2.0',
  'eslint-plugin-import': '^2.22.1',
  'eslint-plugin-jsx-a11y': '^6.4.1',
  'eslint-plugin-react': '^7.21.5',
  'eslint-plugin-react-hooks': '^4 || ^3 || ^2.3.0 || ^1.7.0'
}

Log files showing details about the error are located at ~/.npm/_logs/.

The log file shows that npx install-peerdeps chooses ^7.2.0 for eslint and ^1.7.0 for eslint-plugin-react-hooks. BUT the latter eslint-plugin-react-hooks@^1.7.0 requires eslint@"^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0" (according to the log file) hence the error resolving the dependency tree.

I explicitly installed the latest of all packages (i.e. npm install eslint --save-dev etc) which installed the following versions (from package.json) which are in line with the dependencies above.

 "devDependencies": {
    "eslint": "^7.25.0",
    "eslint-config-airbnb": "^18.2.1",
    "eslint-plugin-import": "^2.22.1",
    "eslint-plugin-jsx-a11y": "^6.4.1",
    "eslint-plugin-react": "^7.23.2",
    "eslint-plugin-react-hooks": "^4.2.0"
  }
over 4 years ago · Santiago Trujillo Report

0

You just need to run:

(
  export PKG=eslint-config-airbnb;
  npm info "$PKG@latest" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs npm install --save-dev "$PKG@latest"
)

Instead, as stated in the official docs

over 4 years ago · Santiago Trujillo Report

0

I had the same problem. My problem was that I had permissions erros when I was installing global packages. First I tried to change the permissions for my node_modules but that didn't worked for me, so I just configured npm to use a different directory.

Here you can see how you can do that: https://stackoverflow.com/a/55274930

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!