Navigation Menu

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

Engine node incompatible >=8.12.0 #741

Closed
Vadorequest opened this issue Jul 10, 2019 · 10 comments
Closed

Engine node incompatible >=8.12.0 #741

Vadorequest opened this issue Jul 10, 2019 · 10 comments
Labels

Comments

@Vadorequest
Copy link

I wonder why the node engine must be higher than 8.12, it's really not a good thing, especially since aws only supports 8.10 natively. What's the reason for this choice?

@dnalborczyk
Copy link
Collaborator

it's more a "should be", than a hard "must be".

serverless-offline is build on hapi v18, which requires minimum node v8.12.
That being said, I wouldn't be surprised if you can use lower minor node versions, if you don't hit any code paths requiring v8.12.

@Vadorequest
Copy link
Author

Right now, it's treated as a must be

@dnalborczyk
Copy link
Collaborator

dnalborczyk commented Jul 10, 2019

why?

@Vadorequest
Copy link
Author

image (4)

Because yarn doesn't allow to install the packages then. And not everybody knows about yarn install --ignore-engines. (I had forgotten about this bypassing option)
I wonder if there is a way to display a warning rather than an error.

@dnalborczyk
Copy link
Collaborator

dnalborczyk commented Jul 11, 2019

I wonder if there is a way to display a warning rather than an error.

this is really yarn's decision to error out, the same way if they could decide to error out if some peer dependency version is not met. somewhat out of control of this plugin.

I can't really tell if it was an arbitrary decision of the hapi framework to require node v8.12, or if it is a technical requirement. in order to find out the details you might have to ask over there.

this plugin took a dependency on hapi v18, which itself states a min requirement of v8.12 - and that's pretty much it. we didn't question the why.

@dnalborczyk
Copy link
Collaborator

dnalborczyk commented Jul 11, 2019

@Vadorequest it might be arbitrary, not sure. travis is testing the latest 'minor' version: https://github.com/hapijs/hapi/blob/master/.travis.yml Maybe at the time of writing, v8.12 was the latest lts, who knows. I couldn't find anything outstanding in the v8.12 changelog which would require that particular version.

@Vadorequest
Copy link
Author

@dnalborczyk I asked the question on hapijs/hapi#3961 and it seems there is no real reason on the Hapi side for forcing v8.12.0, I therefore suggest you don't enforce a specific node version if there are no impact. I'd suggest using node 8 as minimal compatible version, instead of node 8.12, to avoid such useless warning and worries for developers.

@dnalborczyk
Copy link
Collaborator

thanks for following up on the issue @Vadorequest !

As I assumed, they are essentially testing and supporting the latest minor version of each LTS branch, which for v8, is not v8.12, but whichever the latest minor version is at a given point in time, which right now would be v8.16.

In that case I don't see a big issue for serverless-offline to support node v8.10 - until we hit a problem (if ever), which we can solve when it happens.

I'd suggest using node 8 as minimal compatible version

that doesn't work because of certain language features we're already using, e.g. object rest/spread, which requires node.js v8.3+

I think it's a good compromise with AWS supporting v8.10 as well. That issue will also solve itself with the v10.x release branch, with AWS also supporting the latest minor/patch version, rather than some frozen version.

@Vadorequest
Copy link
Author

In that case, I believe the best choice would be to support v8.10+ instead of v8.12+, so that people who are running aws (most common use case for the serverless framework) don't encounter this issue.

GCP uses v8.15.0 (see https://cloud.google.com/functions/docs/concepts/nodejs-8-runtime) so allowing v8.10 seems to cover it as well, which is a good thing for the few users using GCP.

@dnalborczyk
Copy link
Collaborator

In that case, I believe the best choice would be to support v8.10+ instead of v8.12+

yeah, that's what I meant. It's fixed in 4640522

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

No branches or pull requests

2 participants