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

v9.0.0 incompatible with Cypress. Throwing exception #771

Closed
bondar-artem opened this issue Mar 19, 2020 · 27 comments
Closed

v9.0.0 incompatible with Cypress. Throwing exception #771

bondar-artem opened this issue Mar 19, 2020 · 27 comments

Comments

@bondar-artem
Copy link

  • Operating System:
    macOS Mojave, v.10.14.6
  • Node.js version:
    v10.16.0
  • fs-extra version:
    v9.0.0

image

Previous version 8.1.0 works just fine

@RyanZim
Copy link
Collaborator

RyanZim commented Mar 20, 2020

It's erroring out over an optional catch binding we use. What's puzzling is why you'd be getting this error on Node v10.16.0; as optional catch bindings are supported in Node since v10.0.0.

@26medias
Copy link

26medias commented Mar 24, 2020

We have 16 prod repositories that broke on deploy, had to force 8.1.0 on all of them.

Do you have a fix planned for the latest version?

Node v8.x, local & on Google Cloud Functions.

@RyanZim
Copy link
Collaborator

RyanZim commented Mar 24, 2020

@26medias The changelog clearly states that Node.js v10 or greater is required for fs-extra v9.

@bondar-artem
Copy link
Author

I have Node v10 but still having issues

@RyanZim
Copy link
Collaborator

RyanZim commented Mar 24, 2020

@Postavshik That's what's puzzling. I'm not familiar with Cyprus myself; looks like some sort of browser testing solution; is this code trying to run in-browser or something?

@bondar-artem
Copy link
Author

Cypress is the framework for web ui automation. The tests are executed in the browser (as far as I know). Why is having the issue - have no idea )

@RyanZim
Copy link
Collaborator

RyanZim commented Mar 24, 2020

fs-extra v9 uses option catch bindings, which work in Node v10+ Something in your toolchain doesn't support them, I don't know what.

@drom
Copy link

drom commented Mar 24, 2020

That is only one minor feature that breaks Node 8. That we really need.

@retorquere
Copy link

retorquere commented Apr 1, 2020

My tests on travis are failing because of this error. My travis logs claims it's running under node v11.10.1

edit: if I nvm-install 13.8.0 on travis, the error goes away.

@26medias
Copy link

26medias commented Apr 2, 2020

Breaking a popular lib for everybody not on V10 is a little bit problematic isn't it?
Node V8 isn't deprecated. It's still widely popular.

Never tried this, but guess that might be the fix?
https://stackoverflow.com/questions/29349684/how-can-i-specify-the-required-node-js-version-in-package-json

@ErisDS
Copy link

ErisDS commented Apr 2, 2020

Node v8 has been EOL since 31st Dec 2019: As shown here:
https://nodejs.org/en/about/releases/
and here:
https://github.com/nodejs/Release/blob/master/schedule.json#L38

It is no longer supported widely, and nor should it be, as it is no longer being maintained.

fs-extra already has the minimum node version declared in the package.json engines field.

The feature that's being used here is Optional Catch bindings and is reported as widely supported in Node.js v10.


All of that being said, we're also seeing this error in an environment self-reporting as Node.js v12 and will update when we get to the bottom of it.

@retorquere
Copy link

Maybe it's just terminology, but I don't understand what being reported as widely supported in v10 entails -- wouldn't any given node version (and forward, one should hope) unequivocally either support this or not support this, rather than being widely supported, which would imply that the majority of v10 installations support it, but not all?

@RyanZim
Copy link
Collaborator

RyanZim commented Apr 2, 2020

All Node 10 versions support optional catch bindings. I suspect most of the cases reporting problems in newer versions will be traced to using tooling with outdated JS parsers.

@retorquere
Copy link

That's possible, but then that means "if you have node v10+ you're good to go" isn't true.

@retorquere
Copy link

There's also the thing that I upgraded node to 13.8.0 on Travis and that solved the breakage for me. I didn't change any packages. So it's not strictly tools with outdated parsers, because that wouldn't be affected by an upgrade of node from v11 to v13 (right?)

@RyanZim
Copy link
Collaborator

RyanZim commented Apr 2, 2020

If we can get a reduced test case of stuff breaking on Node 10+; that would be very helpful.

@ErisDS
Copy link

ErisDS commented Apr 2, 2020

Sorry for the confusing "widely supported" term. The compatibility site I linked starts at 10.3.0, so I wasn't sure if it was introduced in 10.3.0 or before, but I see mousing over that the ui collapsed, and is reported in all 10.x versions: https://node.green/#ES2019-misc-optional-catch-binding.

In our case, the problem is likely to do with nvm or some similar tool. Different users can end up with different Node versions, and it can be tricky to track down what's installed where.

@retorquere
Copy link

In my case it was 11.10.1 though. Travis reports the active nodejs before the tests start.

@ErisDS
Copy link

ErisDS commented Apr 2, 2020

@retorquere this repo runs tests on travis with Node 11 - so it should be possible to add a minimal test case to demonstrate what failed for you on Node 11?

@retorquere
Copy link

My mistake -- there must be something odd on Travis, but I can confirm it breaks with v9 but works with v10.

@oleksiydubovykTR
Copy link

Same with Node v12.14.1 here, fine up to v8.0.1

@ricardogobbosouza
Copy link

This problem happens only on MacOS.

@dubbha
Copy link

dubbha commented Apr 26, 2020

Same with Node v12.14.1 here, fine up to v8.0.1

this one is on Windows 10

@RyanZim
Copy link
Collaborator

RyanZim commented Jun 3, 2020

It's been over a month with no action here; gonna close this one out. Happy to reopen if there's a reduced test case of stuff breaking on Node 10+

@RyanZim RyanZim closed this as completed Jun 3, 2020
@Inventsable
Copy link

I'm getting this error as an Adobe developer who has no choice but to use Node v8.6.0 for the next few years until the coming UXP platform, unfortunately updating Node isn't an option for me and this is a dependency of another library I'm trying to use.

Any recommendations of versions of fs-extra to downgrade to or some kind of resolution/fix for those of us who can't upgrade Node would be appreciated

@RyanZim
Copy link
Collaborator

RyanZim commented Jun 8, 2020

@Inventsable any fs-extra version below v9 should work on Node 8

@rmlzy
Copy link

rmlzy commented Aug 13, 2020

"fs-extra": "8.1.0" working

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

No branches or pull requests