Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't find types #64

Open
utlandingur opened this issue Dec 2, 2024 · 1 comment
Open

Can't find types #64

utlandingur opened this issue Dec 2, 2024 · 1 comment

Comments

@utlandingur
Copy link

Could not find a declaration file for module 'google-news-scraper'. '/Users/lukehening/Sites/podcast-episode-recommender/node_modules/google-news-scraper/dist/esm/index.mjs' implicitly has an 'any' type.
There are types at '/Users/lukehening/Sites/podcast-episode-recommender/node_modules/google-news-scraper/dist/tsc/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'google-news-scraper' library may need to update its package.json or typings.ts(7016)

@fasihhussain00
Copy link

I fixed it by updating my package.json and tsconfig.json file

here is my package.json

{
	"scripts": {
		"start": "ts-node main.ts"
	},
	"dependencies": {
		"google-news-scraper": "^2.7.0",
		"ts-node": "^10.9.2",
		"typescript": "^5.7.2"
	}
}

here is my tsconfig.json file

{
  "compilerOptions": {
    "module": "commonjs",
    "target": "es6",
    "typeRoots": ["./node_modules/@types"],
    "esModuleInterop": true,
    "strict": true
  }
}

please close this issue if its resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants