-
Notifications
You must be signed in to change notification settings - Fork 46
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
Yarn workspaces #41
Comments
With yarn workspaces, wouldn't you still want each individual project to have the proper dev deps listed? |
You have no choice. Yarn will install everything in the repo root and create symlinks in your packages/app/node_modules/.bin/ folder pointing to it. Given that other packages have the same or a compatible semver in their devDeps. |
Right - so why wouldn’t the runner be able to find the symlink? |
Actually found the problem already very quickly looking at the code. Find-up is not the right way. A proper require.resolve like lookup would be better. Maybe resolve-from instead of find-up would do the trick. |
The resolve module can do it by setting a basedir; that would be far better than using resolve-from. |
Using jest rootDir which commonly is the package root not the repo root... I think packages shouldnt explicitly know they live in a mono-repo. Worse: if other packages have different semver of eslint and it WILL install in your package node_modules and setting the baseDir to repo-root will pick up the wrong version for you. Resolve-from picks up the closest installation starting from rootDir is the correct behaviour imo. |
I agree - I'm only saying that we won't be using the |
The module resolver looking for your local eslint installation seems not to be compatible with yarn workspaces.
It apparently only looks into the ./node_modules folder in the rootDir and not the repo-root node_modules.
The Error:
The text was updated successfully, but these errors were encountered: