microlinkhq / metascraper

Get unified metadata from websites using Open Graph, Microdata, RDFa, Twitter Cards, JSON-LD, HTML, and more.
https://metascraper.js.org
MIT License
2.35k stars 168 forks source link

Can't resolve 'http2' #458

Closed cyudfd closed 3 years ago

cyudfd commented 3 years ago

Prerequisites

Subject of the issue

Using webpack and I'm getting a compile error:

Failed to compile.

./node_modules/http2-wrapper/source/index.js
Module not found: Can't resolve 'http2' in 'Users/user/myapp/node_modules/http2-wrapper/source'

Steps to reproduce

  1. Run yarn add metascraper
  2. Import to ts file and export scraper instance, i.e. export const scraper = metascraper([]);
  3. Build app using webpack
  4. import the build file into html and execute await scraper({ html, url })
  5. Run app

Expected behaviour

File should be compiled.

Actual behaviour

Failed to compile.

Kikobeats commented 3 years ago

What's your node version?