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

Incompatible with keyv, but only in monorepo #1592

Closed
dandv opened this issue Jan 4, 2019 · 4 comments
Closed

Incompatible with keyv, but only in monorepo #1592

dandv opened this issue Jan 4, 2019 · 4 comments

Comments

@dandv
Copy link
Contributor

dandv commented Jan 4, 2019

pnpm version

2.23.1

Code to reproduce the issue

Please see jaredwray/keyv#70

Expected behavior

node a/index.js should run with no output.

Actual behavior

"Error: Cannot find module '@keyv/mongo'".

Additional information

  • node -v prints: v10.13.0 or v11.6.0
  • Linux
@dandv
Copy link
Contributor Author

dandv commented Jan 5, 2019

Turns out the culprit is this require line:

return new (require(adapters[adapter]))(opts);

What could be added to the "Does not work with X" FAQ entry to help module authors ensure compatibility with pnpm in cases like these?

@zkochan
Copy link
Member

zkochan commented Jan 5, 2019

Related: #1486

@zkochan
Copy link
Member

zkochan commented Jan 5, 2019

We should encourage users to declare their optional peer dependencies via the new "peerDependenciesMeta" field. We don't support it yet but we will.

@zkochan
Copy link
Member

zkochan commented May 7, 2022

If there is still an issue, use node-linker=hoisted

@zkochan zkochan closed this as completed May 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants