Coder Social home page Coder Social logo

Comments (7)

tobiaslins avatar tobiaslins commented on April 30, 2024 4

Hey!
I just had a deeper look into this. It seems like you don't have the plugin eslint-import-resolver-typescript which is required that Eslint knows how to resolve this module.

I saw that you have installed eslint-config-next but not using it (which uses this resolver plugin). You did import "plugin:@next/next/recommended" instead.
If you change the eslint config to include following, it should work (be sure to use the latest version of eslint-config-next. (The Next.js config includes the eslint plugin you'll need)

 extends: [
    "airbnb-typescript-prettier",
    "next",
  ],

Else you can just install the required plugin:
https://github.com/import-js/eslint-import-resolver-typescript

Let me know if it works! :)

from analytics.

gsheppard avatar gsheppard commented on April 30, 2024 3

I have the next configuration for eslint, but I am still seeing this issue.

extends: [
  'next/core-web-vitals',
  'plugin:@typescript-eslint/recommended',
  'airbnb-base',
  'airbnb-typescript',
  'next',
  'prettier',
],

Admittedly a lot of this config is old and haven't audited it in a while. Nor sure if there are any conflicts happening.

from analytics.

tobiaslins avatar tobiaslins commented on April 30, 2024

Hey!
Thanks for reporting. We'll take a closer look into this.
I'll keep you posted!

from analytics.

Hearmstrong avatar Hearmstrong commented on April 30, 2024

@tobiaslins Would this be the same process in a non-typescript project?

from analytics.

timolins avatar timolins commented on April 30, 2024

@Hearmstrong It might not be required. There is a JavaScript version as well: https://www.npmjs.com/package/eslint-plugin-import

Note that I haven't tested this out.

from analytics.

tobiaslins avatar tobiaslins commented on April 30, 2024

Will close this for now. Let us know if you still have problems!

from analytics.

elijahcarrel avatar elijahcarrel commented on April 30, 2024

Thank you so much @tobiaslins! That was exactly my problem and your solution worked. I'm surprised I managed to get this far in my app without actually using eslint-import-resolver-typescript until now 😅.

from analytics.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.