avajs / babel

Babel provider for AVA.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incompatible with node 10.16.0, please provide a wider compatibility window

CaptainChemist opened this issue · comments

I'm installing a package that has @ava/babel as a dependency and when I run it on AWS/Amplify pipeline which currently has a version of node 10.16 and I get an error that:

error @ava/babel@1.0.0: The engine "node" is incompatible with this module. Expected version ">=10.18.0 <11 || >=12.14.0 <13 || >=13.5.0". Got "10.16.0"

Would it be possible to make these dependency checks a little more forgiving? v10.18 only came out 2 weeks ago which makes it difficult to ensure that the AWS Amplify pipeline will be up to date because there will always be a lag.

Thanks for your consideration!

What are you using that makes this an error? I'm pretty sure it will work if you can get the installer to treat this as a warning.

Generally speaking we only test with the latest Node.js versions. A breaking release of AVA is a nice opportunity to update the minimal requirements, which can be useful because even within say Node.js 10 newer APIs have been introduced that we like to make use of.

And finally there are security updates which mean that you should be on the latest version anyhow. There's another Node.js security release due on Tuesday so I hope AWS Amplify upgrades soon.

(I'm closing this issue for housekeeping purposes, but let's keep the conversation going.)

I'm encountering the same problem where @ava/babel is a subdependency of a project running on a node 12 AWS lambda and is breaking my build process.

I don't disagree about the importance of security updates but isn't the engines field specifically intended to communicate compatibility rather than punish those who aren't running latest?

It’s the compatibility we’re comfortable guaranteeing.

What about your setup is causing this to stop anything from working? The engines field is supposed to be advisory.

It's certainly your prerogative what you want to support; I would only add that the current range spanning node 10.18.0 to 13.5.0, but only specific minor versions seems to go against the compatibility idea.

My specific use case is a Gatsby build on Netlify (webpack build), so the runtime is out of my hands. I have submitted a PR to the owner of the package requiring @ava/babel so it hopefully won't affect many other users.

I don’t understand what is treating the engines as mandatory rather than advisory.

I can't test right now but perhaps it's specific to AWS given my shared experience with the original issue creator.

@novemberborn I'm actually just trying to use react-player and ava is a dependency, so this is similar to the behavior that @lloydh is mentioning. Here's a link to the repo:
https://www.npmjs.com/package/react-player

The silly thing is that as far as I understand it, I should not actually care about @ava/babel at all because I'm not even running through the react-player testing library. I ended up fixing my particular problem by using an earlier version of the react-player library which relies on an earlier version of @ava/babel.

@CaptainChemist that's what brought me here.

@ava/babel should have been a devDependency so I submitted a PR to fix this. Now merged so you shouldn't have the problem in 1.15.2