Closed WxSwen closed 2 years ago
Where does that error show up? On the CLI, or in vscode?
Where does that error show up? On the CLI, or in vscode?
In vscode, i can solve it by restart command,but this error show in command line。And we find it can change eslintrc and restart then it will clear cache,but it works。thanks
You always have to restart vscode (and other editors) when node_modules have changed, which includes when checking out a sha with a different package.json. It's got nothing to do with eslint or this plugin.
I'm seeing this in our Bitbucket Pipelines. Just started seeing this with new builds
@Oliver84 meaning, when you add a new alias to your tsconfig, you’re seeing builds fail in CI?
Sorry, I thought it was a related issue but I can file a new one for this. I'm seeing the same error with 2.25 but I'm not adding a new alias to tsconfig. Just added a new import to a regular jsx file and I'm getting:
Unable to resolve path to module 'react-toastify/esm/react-toastify'. [Error/import/no-unresolved] 1 problemerror: 'eslint' errored after 12s { "data": { "message": "Failed with 1 error", "name": "ESLintError" } } npm ERR! Test failed. See above for more details.
I’m on mobile rn so i can’t check, but my guess is that that package doesn’t support CJS - ie, it lacks a main and relies on “exports”. If so, this plugin (like much of the ecosystem) doesn’t support that yet, and you’ll have to use import/ignore for it.
close in favor of https://github.com/import-js/eslint-import-resolver-typescript
When i add a new alias path in tsconfig,others pull my code and restart will found this error: import/no-unresolved。
And he should open the file in project and save again。It will be solved,so i think it will be a eslint cache problem?
Please tell me how to solve this error,thanks。