-
Notifications
You must be signed in to change notification settings - Fork 35
encoding not found when requiring node-fetch #30
Comments
I've seen this happen with netlify-lambda in the past. I've not used node-fetch very much and axios (my preferred package) does not have this issue. Related customers: https://app.intercom.io/a/apps/q245f50x/inbox/inbox/unassigned/conversations/21646909770 |
Its not us, its happening in user code. e.g. when we try to bundle a function using node-fetch with ZISI, ZISI complaints that it can't locate encoding. Looks like it could be a user error:
It looks like node-fetch depends on encoding as a optional peer dependency. |
One thing we could also do is just print a warning instead of outright failing. |
oh, thanks for this! |
Is this the cause for my deployments failing when I haven't changed anything in my functions? They worked without issue a few days ago. Are there some detailed instructions you can point me to that will help me resolve my issue? I wrote a post about how I got my function working, and as you might see, I was following other people's instructions about how to do this kind of stuff. Meaning, this isn't a strong skill for me to begin with. :) Any advice will be helpful. I think I'm going to turn off the function for the time being so that I am not prevented from updating my site, but I don't want to do that for long, naturally. |
@bridgestew install the |
Hello, @bcomnes I've added
|
It looks like a function is requiring |
I got it now. The bundling seems to have traversed one level up and got the |
Close this issue when d3e4b2a is released. |
Just for reference, this problem is not specific to This has been fixed in |
… in zip-it-and-ship-it during Netlify build: netlify/zip-it-and-ship-it#30
For some reason, when you try to package a function that requires
node-fetch
the encoding module isn't found.We need to determine if:
Examples in the wild:
The text was updated successfully, but these errors were encountered: