Closed alazsengul closed 11 months ago
I saw that v7.3.0 stopped supporting the CommonJS version.
So I instead installed v7.2.18 and that seemed to work: npm i @extractus/article-extractor@7.2.18
.
I'm unfamiliar with CommonJS vs. ES modules, so maybe I'm setting up my project incorrectly? I'm using this package as a helper function for an Express API server.
Actually update, it doesn't work when I push it to production. Only on development environment.
@alazsengul it seems your platform still needs CJS support, similar to this issue: extractus/oembed-extractor#177
Please try the version v7.3.1 I've just released.
@ndaidong Thank you for the quick response + help! It now works.
Out of curiosity, for CommonJS support is that something I need to support in my project? It's just a boilerplate Express server. Or is CommonJS something that needs to be supported by the environment I'm deploying the project in (in this case it's Render)?
@alazsengul if you want to update your project to run with ESM, you have to:
"type": "module"
in package.jsonI've created a simple service with @extractus/article-extractor v8.0.1 on Render and it works. In their documentation, I found that Render platform support 14.17.0 as default. That's good news because since this version, you can use ESM without any problem.
Gotcha - thank you so much for the explanation!
Hi, I'm getting the below crash when running
npm run dev
. Am I following the tutorial incorrectly? Thanks in advance!My import looks like the following:
And my package looks like the following: