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

Define node compatibility #14

Closed
aske02 opened this issue Jul 28, 2023 · 1 comment · Fixed by #15
Closed

Define node compatibility #14

aske02 opened this issue Jul 28, 2023 · 1 comment · Fixed by #15
Labels
bug Something isn't working

Comments

@aske02
Copy link
Contributor

aske02 commented Jul 28, 2023

Node compatibility should be defined in package.json due to scraper.ts using a node >18.0.0 feature global.fetch.
As node 16.x is still used by some people, it could create confusion.
Due to the error not being so detailed when global.fetch is not defined.
The error:

ArgumentError {
  name: 'ArgumentError',
  message: 'fetch must be a function'
}

The suggestion is to add the following to the package.json

"engines": {
	"node": ">=18.0.0"
  },
"engineStrict": true
@luttje
Copy link
Owner

luttje commented Jul 28, 2023

Hey @aske02, thanks for this report! You are very much right that this confusion should be prevented by the fix you suggest.

Sadly I don't have time to update, but if you can make a PR I'll be happy to merge. Otherwise I'll have a look in a month or so.

Thanks

@luttje luttje added the bug Something isn't working label Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants