Coder Social home page Coder Social logo

Types Errors about opengraphscraper HOT 6 CLOSED

nekochan0122 avatar nekochan0122 commented on June 26, 2024
Types Errors

from opengraphscraper.

Comments (6)

wfischer42 avatar wfischer42 commented on June 26, 2024

@nekochan0122, I'm having this exact issue. Were you able to fix it? I assumed it had to do with tsconfig exclude settings, but no config I've tried has worked...

I'm using turborepo and yarn workspaces, so it might have something to do with those for my case.

from opengraphscraper.

jshemas avatar jshemas commented on June 26, 2024

Please list the steps to reproduce the problem. (post a code example with your tsconfig)

from opengraphscraper.

wfischer42 avatar wfischer42 commented on June 26, 2024

Ok, it seems to have nothing to do with my tsconfig, and more to do with how this package's types are configured. microsoft/TypeScript#44205

Reproduction steps:

  1. Start a turborepo project (https://turbo.build/repo/docs/getting-started/create-new)
  2. Add open-graph-scraper to /apps/web
  3. Import and call it in an API route
  4. Attempt to build the project

yarn tsc and yarn build fails. Everything works fine if I revert to version 5.0.3 or 4.x.x. (haven't tried other 5.x.x versions, except that it didn't work in 5.1.1, though it threw different errors)

Turborepo uses internal package dependencies via yarn workspaces (or whatever package manager you choose) for things like shared tsconfig files. node_modules is included in the exclude field, but I get a handful of type errors from this package (and only this package) anyway.

from opengraphscraper.

jshemas avatar jshemas commented on June 26, 2024

I have no clue what Turborepo is and it only made a front end app for me... So i'm not sure how to reproduce this problem. Please upload a example repo with this problem.

from opengraphscraper.

jshemas avatar jshemas commented on June 26, 2024

I believe I have fixed the type issues in [email protected]. Please open a new issue if you have anymore problems.

from opengraphscraper.

nekochan0122 avatar nekochan0122 commented on June 26, 2024

@nekochan0122, I'm having this exact issue. Were you able to fix it? I assumed it had to do with tsconfig exclude settings, but no config I've tried has worked...

I didn't fix it, I use cheerio to write my own scrape OG 🤣

image

from opengraphscraper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.