Closed fabianwohlfart closed 2 months ago
Hello. What version of node are using and what does your tsconfig.json
look like?
Hey. It's Node 20.15.1 and the tsconfig.json is auto-generated by Nuxt (https://nuxt.com/docs/guide/directory-structure/tsconfig). I rolled back to 6.5.0 and verified that everything works fine there.
Not sure what Nuxt is. Can you make a example app using Nuxt that demos this problem?
A JS / Vue framework. But I am more or less sure that it's not all about Nuxt, as ogs works in 6.5.x and breaks in 6.6.x. Here is a minimal repro: https://github.com/fabianwohlfart/test__ogs
./app.vue
fetches /api/ogs
which is located in ./server/api/ogs
/api/ogs
is doing await ogs({ url: "https://nytimes.com" })
and failing due to the error above.
(FYI i am away until next thursday, you might not hear back quickly from me)
Thanks!
Hello! Thank you for the full example! It looks like there is some issues with validator.js
in ESM. Fix is live in open-graph-scraper@6.7.0
. Let me know if you have any more issues.
@jshemas watch out - I think your fix is triggering issues with TypeScript
The issue arises because the code is trying to mix export default with export =, which is not allowed in TypeScript. In a module, you cannot use both export default and export = together.
We have had to downgrade to prevent this issue:
@Sydney-o9 That is not related to this issue. Please open a new issue in the future.
I didn't know it was unrelated - I have created an issue https://github.com/jshemas/openGraphScraper/issues/237
Thanks for the quick fix!
We upgraded from 6.5.0 to 6.6.3 and now we get the following error on localhost, didn't test it in prod.