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

Local version mismatch? #3

Open
geelen opened this issue Aug 4, 2022 · 1 comment
Open

Local version mismatch? #3

geelen opened this issue Aug 4, 2022 · 1 comment

Comments

@geelen
Copy link
Owner

geelen commented Aug 4, 2022

One problem is that the native import() doesn't allow a version specifier, so if the consumer project has a version of pkg-a available, npxImport('pkg-a@1.2.3') will use it even if it doesn't match versoin 1.2.3. That's probably something we should warn on...

@geelen
Copy link
Owner Author

geelen commented Sep 27, 2022

Update, have an idea that would work:

  • use require.resolve before trying import()
  • walking the directory for package.json, compare version
  • then import() if ok.

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

No branches or pull requests

1 participant