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

in v6.0.0 with typescript, giving error regarding dynamic import #82

Closed
MananDesai54 opened this issue Nov 29, 2021 · 2 comments
Closed

Comments

@MananDesai54
Copy link

configstore version: 6.0.0
nodejs version: 16.13.0
typescript version: 4.5.2

Error:
require() of ES Module /path/node_modules/configstore/index.js from /path/dist/lib/Key.js not supported.
Instead change the require of index.js in /path/dist/lib/Key.js to a dynamic import() which is available in all CommonJS modules.

I tried changing module and target in tsconfig and added type="module" in package.json but it didin't help

@sindresorhus
Copy link
Member

https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c

@MananDesai54
Copy link
Author

MananDesai54 commented Nov 29, 2021

https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c

Working fine now, Thank you!!

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

2 participants