Skip to content

Commit

Permalink
chore(devs-infra): set minimum node version at 10.21.0 (#1793)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahnpnl committed Jul 12, 2020
1 parent 47312b3 commit d9b62e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -130,6 +130,6 @@
]
},
"engines": {
"node": ">= 10"
"node": ">= 10.21.0"
}
}

5 comments on commit d9b62e3

@lookfirst
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sadly, this just broke my build on Google Cloud Functions.

Build failed: error ts-jest@26.1.2: The engine "node" is incompatible with this module. Expected version ">= 10.21.0".
error Found incompatible module; Error ID:

I have no idea why it has this requirement, but GCF won't allow me to specify anything other than node 10

Error: package.json in functions directory has an engines field which is unsupported. The only valid choices are: {"node": "8"} and {"node": "10"}.

@ahnpnl
Copy link
Collaborator Author

@ahnpnl ahnpnl commented on d9b62e3 Jul 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm this is odd, ts-jest doesn't enable engineStrict in package.json. I also tested myself locally with this change that it didn't break locally for me. Seems like GCF has a strict configuration for node somehow ?

Maybe revert this change is wise to do to make sure all environments work

@medington
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The GCF execution environment is still only on 10.18 so this change breaks compatibility with any development environment that is using that version or earlier (we are actually using 10.15.3 still). What is driver behind making this change to a much stricter version requirement? Is ts-jest 26.1.2 incompatible with node runtimes < 10.21? If not, I'd recommend this change be reverted or at least dropped to the minimum required version for correct operation.

As for the question about engineStrict according to the npm docs that setting was removed in npm 3.0. The Yarn docs (which we use) don't mention that you need that present to have the engine restriction take effect. My personal experience is that if you put an engine entry in place and use yarn and it's always enforced.

image

@ahnpnl
Copy link
Collaborator Author

@ahnpnl ahnpnl commented on d9b62e3 Jul 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The GCF execution environment is still only on 10.18 so this change breaks compatibility with any development environment that is using that version or earlier (we are actually using 10.15.3 still). What is driver behind making this change to a much stricter version requirement? Is ts-jest 26.1.2 incompatible with node runtimes < 10.21? If not, I'd recommend this change be reverted or at least dropped to the minimum required version for correct operation.

As for the question about engineStrict according to the npm docs that setting was removed in npm 3.0. The Yarn docs (which we use) don't mention that you need that present to have the engine restriction take effect. My personal experience is that if you put an engine entry in place and use yarn and it's always enforced.

image

@medington already done with #1804 :)

@lookfirst
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed that adding engineStrict: false solves the issue for now, while using 26.1.2.

Please sign in to comment.