Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: The codeframe formatter is no longer part of core ESLint. #77

Closed
mizdra opened this issue Dec 10, 2021 · 7 comments · Fixed by #79 or #138
Closed

Error: The codeframe formatter is no longer part of core ESLint. #77

mizdra opened this issue Dec 10, 2021 · 7 comments · Fixed by #79 or #138
Labels
Type: Bug Bug or Bug fixes

Comments

@mizdra
Copy link
Owner

mizdra commented Dec 10, 2021

log:

✔ What format do you want to display the problem message in? · withPager
Error: The codeframe formatter is no longer part of core ESLint. Install it manually with `npm install -D eslint-formatter-codeframe`
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
    at Function.Module._load (internal/modules/cjs/loader.js:746:27)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:93:18)
    ...
@mizdra mizdra added the Type: Bug Bug or Bug fixes label Dec 10, 2021
@mizdra
Copy link
Owner Author

mizdra commented Dec 10, 2021

  • eslint-formatter-codeframe is a formatter for eslint
  • eslint-interactive uses it to display error messages.
  • The formatter is included in the dependencies of eslint-interactive.
  • I will investigate the cause of the problem.

@mizdra
Copy link
Owner Author

mizdra commented Dec 10, 2021

Notes

This problem does not occur when using eslint-interactive with eslint v7, because eslint v7 bundles eslint-formatter-codeframe. The problem may occur when using eslint-interactive with eslint v8.

@mizdra
Copy link
Owner Author

mizdra commented Dec 12, 2021

  • It seems that the problem is reproduced when eslint-interactive is installed globally and eslint is installed locally.
    • The reason seems to be that the locally installed eslint cannot import the globally installed eslint-formatter-codeframe.
  • To solve the problem, we might need to consider the following approach.
    • Install both eslint-interactive and eslint globally
    • Install both eslint-interactive and eslint locally

@mizdra
Copy link
Owner Author

mizdra commented Dec 12, 2021

Decision

  • Many projects that use eslint-interactive use a local installation of eslint.
  • Therefore, it is best to install eslint-interactive locally as well.
  • So, we want to warn the user when the eslint-interactive is started from a global installation.
    • The global installation of eslint-interactive will no longer be recommended.
    • This is BREAKING CHANGES.

@mizdra mizdra added the Type: Breaking Change Includes breaking changes label Dec 12, 2021
@mizdra
Copy link
Owner Author

mizdra commented Dec 12, 2021

FYI: A typical example of a development support tool that is recommended for local installation is webpack-bundle-analyzer.

@mizdra
Copy link
Owner Author

mizdra commented Feb 5, 2022

I came up with a way to fix this error.

@mizdra
Copy link
Owner Author

mizdra commented Feb 5, 2022

Maybe it's fixed 🎉

@mizdra mizdra unpinned this issue Feb 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Bug or Bug fixes
Projects
None yet
1 participant