-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Compatibility with pnpm #3837
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi everyone,
I'm a big fan of pnpm, and I wanted to use it with a project using karma as test runner and I noticed that karma was not compatible with pnpm.
I debugged my config and I found that:
lib/plugin.js
directory and go two directories up to retrieve thenode_modules
directory (here).node_modules
, it is installed in a.pnpm
directory inside the projectnode_modules
directory. The directory tree will look like this:➡️ By going two directories up, the plugin directory is then
[project]/.pnpm/[email protected]/node_modules
, so obviously no plugins will be detected.A (probably very naive) fix would to use
process.cwd()
instead of__dirname
ofkarma/lib/plugin.js
, this way you would get the project root directory. But, as said, it's probably very naive, and I'm sure I probably miss a lot of use cases.In any case, I'd be happy to submit PR to fix this issue if you think it's worth it.
The text was updated successfully, but these errors were encountered: