-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
npm 5 link / lerna resolve issue #9746
Comments
I'm afraid I don't know much about lerna. Does this issue happen without lerna as well? I'm honestly not sure whether we're supposed to support lerna... @eslint/eslint-team Can anyone weigh in here? |
This is happening because lerna is installing |
@not-an-aardvark how this dependency installation should look like? I'm using lerna and happens to me the same, but if I bypass lerna and install dependencies normally, with |
I'm having the same problem and already tried to install locally at package level as well, got the same error output. Edit: nevermind, @not-an-aardvark comment made sense to me after a sec of thought. root package.json that works now: {
"babel-eslint": "^8.2.1",
"eslint": "^4.15.0",
"@pismo/eslint-config-bolt": "^0.0.1-5",
} |
@gugiserman the solution I came up with a few minutes ago was to avoid hoisting the
This resolved correctly the shared eslint config, although it takes more time at installing. EDIT: I like more your solution, btw. At least from the performance point of view. |
Closing this issue as it seems like it's resolved. |
I do not think this issue should be closed. I still think this is a bug and eslint should work as expected with npm link/lerna without additional configuration. I've updated the example repo with a babel example that works as expected. |
The example @chrisblossom is quite self-explanatory. As specified here, it'd probably has to do with the module resolution, that doesn't follow the module resolution spec closely. |
I think this is a general property of libraries that have One might reasonably argue that the design should be changed, and I'd be open to considering that, provided that a clear proposal is presented which takes compatibility issues into account. (Keep in mind that config/plugin resolution has been discussed at length in issues like #3458 -- it might be worth reading some of that discussion if you're interested in learning more about the tradeoffs of ESLint's config resolution.) In any case, this behavior is not a bug. |
It sounds like we should close this. If someone would like to make a new issue with a concrete proposal, please feel free! |
Fixes module resolution by splitting extraPath into all possible paths, and by fixing the project path
@gugiserman regarding your way of fixing this issue I have a local package containing my eslint configuration, which is scoped, however when I try and install it in the root directory I get package not found on:
Which isn't surprising as it's not published. I've also just added it as a dependency in the package.json and attempted And I've tried simply using In some instances it seems to work without the scoped namespace however I'd like to keep it and you have it in your example, are there any different steps you followed? |
Tell us about your environment
4.13.1
8.9.3
5.6.0
What parser (default, Babel-ESLint, etc.) are you using?
default
Issue:
When using Lerna with npm v5, eslint is unable to correctly resolve linked packages.
Example Repo: chrisblossom/eslint-issue-9746
Updated repo to include both scoped and non-scoped example.
What actually happened? Please include the actual, raw output from ESLint.
The text was updated successfully, but these errors were encountered: