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 it possible to enable the Require() Import ? #392

Open
Philrobots opened this issue May 9, 2024 · 0 comments
Open

Is it possible to enable the Require() Import ? #392

Philrobots opened this issue May 9, 2024 · 0 comments

Comments

@Philrobots
Copy link

Philrobots commented May 9, 2024

Hello,

I have a typescript application and I use your tool. In my Typescript file, I import your library dynamically with the

import { extract } from “@extractus/article-extractor”;

But once the code compiles in Javascript, it converts to

const article_extractor_1 = require(“@extractus/article-extractor”);

And I get an error :

const article_extractor_1 = require("@extractus/article-extractor");

Error [ERR_REQUIRE_ESM]: require() of ES Module 

** to a dynamic import() which is available in all CommonJS modules.

Is it possible to make the import available with require like the old article-parser library?

Thanks

Translated with DeepL.com (free version)

@Philrobots Philrobots changed the title Is it possible to access the Require() Import ? Is it possible to enable the Require() Import ? May 9, 2024
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