Comments (6)
@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.
Please list the steps to reproduce the problem. (post a code example with your tsconfig)
from opengraphscraper.
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:
- Start a turborepo project (https://turbo.build/repo/docs/getting-started/create-new)
- Add open-graph-scraper to
/apps/web
- Import and call it in an API route
- 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.
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.
I believe I have fixed the type issues in [email protected]
. Please open a new issue if you have anymore problems.
from opengraphscraper.
@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 🤣
from opengraphscraper.
Related Issues (20)
- open-graph-scraper > 4.11.1 jest and supertest segfault HOT 3
- Cannot find module './lib/openGraphScraper' or its corresponding type declarations HOT 3
- TS Error: Cannot find module './lib/openGraphScraper' HOT 3
- Something is not right with the types HOT 4
- Type error in index.ts HOT 1
- Missing got dependency HOT 2
- Can the library keyv be replaced with something else? HOT 3
- fetchOptions type HOT 1
- Regression: Fetching `https://facebook.com` yields no image HOT 5
- Lower Node 18 requirement HOT 1
- Problem with specifying the html option in TypeScript HOT 1
- Why the error with a generic 400/500 error message? HOT 2
- Twitter / X.com Open graph tags not working anymore HOT 4
- It is better to export SuccessResult and ErrorResult types HOT 2
- Fail to detect charset from certain ShiftJIS page HOT 10
- Add Support for Edge Functions HOT 2
- Support title & description fields HOT 5
- Docker/ docker compose HOT 3
- Remove `charset` from result JSON HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opengraphscraper.