-
-
Notifications
You must be signed in to change notification settings - Fork 215
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
Question: getting "import/no-unresolved" with eslint in TypeScript project #570
Comments
Me too, and originally I thought it was an real import error however I see the CSS resolving in my build output. I don't believe TypeScript is relevant to the issue. For me the steps to reproduce were
Which gives
Given that this seems to be a newer NodeJS import feature due to the note in the README about using a different import for older Node version, it makes me think that this might be an issue with ESLint itself 🤷 |
Good day @maurocolella / @benz2012 Do you have any example code for me? What packages did you install, which node version are you using and how does your eslint and tsconfig files look like? |
@KingSora Here you go https://github.com/benz2012/overlayscrollbars-issues-570 This is create-react-app v5.0.1 with the addition of the airbnb eslint config, which enables errors on My Node version is |
Upgrading to latest Node stable ( |
I've even tried ejecting the CRA and then manually upgrading eslint and eslint-webpack-plugin, but that didn't resolve the issue. Basically, I'm curious if CRA is core to the issue here, and was hoping to not have to spin up a React project from scratch to test that assumption, lol |
@maurocolella @benz2012 I believe you two have the same issue here. Turns out this is a known issue for eslint and CRA:
As long as your build works you could just do something like: // eslint-disable-next-line import/no-unresolved
import 'overlayscrollbars/overlayscrollbars.css'; But since this is a little bit unsatisfactory I've made some compatibility changes in the newest version So going forward @benz2012 thanks again for you example repo which helped me to figure this issue out, this made the process much quicker |
Awesome! Confirming the lengthier import works for me in |
@maurocolella I'll close this issue for now.. In case your problem is not solved please don't hesitate to give feedback here or to open a new issue. |
Appreciate it, thanks. Just wanted to note that I am not using |
Hi,
I am struggling to get TypeScript to resolve this export/module, and I wasn't sure how to ask for help.
The text was updated successfully, but these errors were encountered: