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

Is there a version which supports CJS ? #80

Open
madhur opened this issue Nov 6, 2023 · 3 comments
Open

Is there a version which supports CJS ? #80

madhur opened this issue Nov 6, 2023 · 3 comments

Comments

@madhur
Copy link

madhur commented Nov 6, 2023

We are using node v14 and this module doesn't seem to work with that version since we are using "require" statements instead of "import".

@lumpov
Copy link

lumpov commented Feb 25, 2024

?

@andrewplu
Copy link

Seems like v6.1.0 works

const CacheableLookup = require('cacheable-lookup');

@MorningLightMountain713
Copy link

MorningLightMountain713 commented May 21, 2024

We are using node v14 and this module doesn't seem to work with that version since we are using "require" statements instead of "import".

This is how I use it on node v14 with cjs:

  // we have to dynamic import here as cacheable-lookup only supports ESM.
  const { default: CacheableLookup } = await import('cacheable-lookup');

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

4 participants