Open
Description
Which problem is this feature request solving?
When my project was using new Node 18 APIs:
- functions would work locally using the CLI
- deploys would fail
This is because AWS doesn’t support Node 18 (at the moment of running the CLI).
Downgrading to Node 16 fixed it.
Describe the solution you'd like
A great developer experience would have been to know about this version incompatibility prior to deploying.
Perhaps the CLI could tell users when they’re using edge functions in conjunction with versions of Node.js that aren’t supported?
For example:
> ntl dev
Running Netlify Functions with an unsupported version of Node.js (18) and may not deploy as expected.
Consider using a version of Node.js listed in https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/edge-functions-restrictions.html#lambda-at-edge-function-restrictions
(To hide this message... /* provide way to dismiss the message for this project? */)
Pull request (optional)
- I can submit a pull request.
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
[-]Alert user when they're using edge functions + unsupported Node versions[/-][+]Alert user when they're using functions + unsupported Node versions[/+]tinfoil-knight commentedon Sep 27, 2022
@danez src/lib/edge-functions/proxy.js seems like a good place for implementing this. Specifically, we could do this after the
hasEdgeFunctions
check.cli/src/lib/edge-functions/proxy.js
Lines 89 to 96 in 138681d
The warning message provided in the issue description seems fine to me.
I don't want to provide a way to hide the warning though for the while being.
What do you think?
tinfoil-knight commentedon Nov 26, 2022
Update here: AWS now supports NodeJS 18 as per https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html