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

import/no-unresolved #945

Closed
xereda opened this issue Oct 13, 2017 · 10 comments
Closed

import/no-unresolved #945

xereda opened this issue Oct 13, 2017 · 10 comments

Comments

@xereda
Copy link

xereda commented Oct 13, 2017

I am using the vscode editor and am having problems with eslint validation of false-positive type. My operating system mac os (high sierra).

More details:

Error:

[eslint] Casing of [relative path] does not match the underlying filesystem. (import / no-unresolved)
module "[module path]"

captura de tela 2017-10-13 as 12 34 17

captura de tela 2017-10-13 as 12 34 22

captura de tela 2017-10-13 as 12 34 27

pajzvoej82

"eslint": "^4.8.0",
"eslint-config-airbnb": "^15.0.1",
"eslint-import-resolver-webpack": "^0.8.3",
"eslint-plugin-import": "^2.6.0",
"eslint-plugin-jest": "^21.2.0",
"eslint-plugin-jsx-a11y": "^6.0.2",
@wachunei
Copy link

wachunei commented Oct 13, 2017

I guess this is related with #720, @benmosher when is 2.8.0 release scheduled for?

@M1chaelTran
Copy link

+1

@saaage
Copy link

saaage commented Nov 5, 2017

@xereda Are you opening VS Code from the command line? I've seen this error come up in Atom when I opened a project using by cd'ing using the wrong casing. ea: desktop/projectname vs Desktop/projectname

@xereda
Copy link
Author

xereda commented Nov 6, 2017

@Sage911 I open the project from within the vscode.

@mattcleary55
Copy link

I'm having the exact same issue with Atom.

@fgeorgsson
Copy link

fgeorgsson commented Nov 28, 2017

Getting the same problem. ./node_modules/.bin/eslint . works fine from command line, but does not work in the terminal in Visual Studio Code. Does not work with the ESLint plugin either - all imports in code files are marked with this error.

I'm on Windows 10 and Visual Studio Code 1.18.1.

$ yarn list | grep eslint
├─ eslint-config-airbnb-base@11.3.2
│  └─ eslint-restricted-globals@^0.1.1
├─ eslint-config-airbnb@14.1.0
│  └─ eslint-config-airbnb-base@^11.1.0
├─ eslint-import-resolver-node@0.3.1
├─ eslint-module-utils@2.1.1
├─ eslint-plugin-import@2.8.0
│  ├─ eslint-import-resolver-node@^0.3.1
│  ├─ eslint-module-utils@^2.1.1
├─ eslint-plugin-jest@21.2.0
├─ eslint-plugin-jsx-a11y@4.0.0
├─ eslint-plugin-react@6.10.3
├─ eslint-restricted-globals@0.1.1
├─ eslint@3.19.0

@ljharb
Copy link
Member

ljharb commented Nov 29, 2017

@PCguru That seems like an issue with VSCode. The only thing that matters is that it works on the command line; anything else is an editor issue.

I'm going to close this; there doesn't seem to be any issue here that's specific to this plugin.

@ljharb ljharb closed this as completed Nov 29, 2017
@EdwardSalter
Copy link

EdwardSalter commented Dec 4, 2017

I am seeing this when via command line when running it through a setup similar to how create-react-app works.
We have a project that houses our webpack build alongside our application boilerplate. I was seeing the error in this app as well until I upgraded all eslint dependencies and it has now disappeared.

After creating a new app using the boilerplate (which is CRA compatible), the new application suffers this problem. This occurs when running eslint via the build script (which uses eslint-loader inside of webpack) and also when running via command line (npx eslint src). The plugin inside of Atom is not affected by this issue for some reason.

EDIT: I have realised that it is actually an occurrence of #720 as my current working directory in Git Bash did not match the casing of the folder structure on disk. As far as I can tell, #720 should be fixed and is in v2.8.0 but I am still seeing it.

@yoyo837
Copy link

yoyo837 commented Mar 9, 2020

It report error ✖️:
Casing of ./FormCreate does not match the underlying filesystem import/no-unresolved

/* eslint-disable import/prefer-default-export */
import FormCreate from './FormCreate';

export { FormCreate };

It does not report error ☑️:

/* eslint-disable import/prefer-default-export */
+
import FormCreate from './FormCreate';

export { FormCreate };

@ljharb
Copy link
Member

ljharb commented Mar 9, 2020

@yoyo837 please file a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

9 participants