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

importFromFigma unexpected fetch error #31

Closed
yunsii opened this issue Sep 13, 2023 · 5 comments
Closed

importFromFigma unexpected fetch error #31

yunsii opened this issue Sep 13, 2023 · 5 comments

Comments

@yunsii
Copy link
Contributor

yunsii commented Sep 13, 2023

When I use importFromFigma, it always throw a 404 error, after investigation, the real error is "ReferenceError: fetch is not defined"
image

So, I think this lib should handle error more elegant, and give a specific requirement of fetch. I use cross-fetch for now like:

import 'cross-fetch/polyfill'

Or integrated cross-fetch?

I can make a PR if possible.

@cyberalien
Copy link
Member

Update node, newer versions have built in fetch.

@yunsii
Copy link
Contributor Author

yunsii commented Sep 13, 2023

Update node, newer versions have built in fetch.

https://nodejs.org/en/blog/announcements/v18-release-announce#fetch-experimental Node 18 fetch is experimental feature. And I think the lib should give a specific requirement of fetch or node version.

@cyberalien
Copy link
Member

That's old news from 1.5 years ago. In newer versions it is no longer experimental, it is stable and doesn't require any flags.

@yunsii
Copy link
Contributor Author

yunsii commented Sep 13, 2023

That's old news from 1.5 years ago. In newer versions it is no longer experimental, it is stable and doesn't require any flags.

So lower node version developers only investigate and resolve the error by themselves.

@cyberalien
Copy link
Member

I agree, error could be made clearer.

But there is no point in doing that. There is no excuse for using 2 years old version of node.

@cyberalien cyberalien closed this as not planned Won't fix, can't repro, duplicate, stale Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants