1

The error says

✖ npm run lint:eslint:fix found some errors. Please fix them and try committing again. Browserslist: caniuse-lite is outdated. Please run next command npm update pre-commit: We've failed to pass the specified git pre-commit hooks as the lint:staged pre-commit: hook returned an exit code (1). If you're feeling adventurous you can pre-commit: skip the git pre-commit hooks by adding the following flags to your commit: pre-commit: pre-commit: git commit -n (or --no-verify) pre-commit: pre-commit: This is ill-advised since the commit is broken.

This is what I see tried to run npm update but I see this now

npm WARN update-browserslist-db@1.0.11 requires a peer of browserslist@>= 4.21.0 but none is installed. You must install peer dependencies yourself.

I tried to fix it but still seeing these errors, can someone help me fixing this issue.

jnpdx
  • 45,847
  • 6
  • 64
  • 94
  • `npm install --legacy-peer-deps` use this command to install the legacy packages – CodeBug May 01 '23 at 04:32
  • Your project has set up [Git Hooks](https://www.atlassian.com/git/tutorials/git-hooks) such that it runs `npm run lint:eslint:fix` before committing. Since ESLint has detected errors in your code, it prevents you from committing. – AnsonH May 01 '23 at 04:32
  • Does this answer your question? [npm: When to use \`--force\` and \`--legacy-peer-deps\`](https://stackoverflow.com/questions/66020820/npm-when-to-use-force-and-legacy-peer-deps) – CodeBug May 01 '23 at 04:32
  • how can we tell you how to fix the lint errors without seeing the full errors, or the code the error messages are referring to? please provide a [mre] – starball May 01 '23 at 04:38

0 Answers0