extractus / oembed-extractor

Extract oEmbed data from given webpage
https://extractor-demos.pages.dev/oembed-extractor
MIT License
104 stars 44 forks source link

Can't resolve 'encoding' in '.......\node_modules\oembed-parser\dist\cjs' #158

Closed calin-berindea closed 1 year ago

calin-berindea commented 1 year ago

Hi, after upgrading from version 3.0.6 to version 3.1.0 (and now I tried also 3.1.3) I get the error

WARNING in ../node_modules/oembed-parser/dist/cjs/oembed-parser.js 1930:16-43 Module not found: Error: Can't resolve 'encoding' in '.......\node_modules\oembed-parser\dist\cjs'

ndaidong commented 1 year ago

@calin-berindea could you share a bit more info about this error? Which platform your script runs on? How do you call the extract method?

calin-berindea commented 1 year ago

We run the build locally both on Windows 10 and Macs and we get the error for both cases. We are using webpack 5, typescript 4.8.

import { extract } from 'oembed-parser' ... const oembedData = await extract(url)

url is a user provided info.

ndaidong commented 1 year ago

@calin-berindea thank you, I will take time to investigate this problem.