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

segmentation fault in import("globby") when running under jest since 10.0 #646

Closed
wood1986 opened this issue Nov 30, 2021 · 7 comments
Closed

Comments

@wood1986
Copy link

wood1986 commented Nov 30, 2021

Bug report

My jest test will create webpack and webpackDevServer. And my webpack config will use copy-webpack-plugin. After upgrading to 10.0, it does not running any tests. I found that import("globby") causing this issue

I think it is related to this issue nodejs/node#35889

On this consumer side, this package lives in node_modules and jest cannot transform it. Maybe you should transform it before publish

Actual Behavior

When I use node --experimental-vm-modules ./node_modules/jest/bin/jest.js

it shows

16710 segmentation fault  node --experimental-vm-modules ./node_modules/jest/bin/jest.js

Expected Behavior

it should not have segmentation fault

@mariusvirb
Copy link

mariusvirb commented Nov 30, 2021

I'm experiencing the same, except I'm simply copying files during build process 🤔

@alexander-akait
Copy link
Member

alexander-akait commented Nov 30, 2021

Yes, bug in jest and Node.js, sorry we can't fix it here, please read and you can ping Node.js/v8 developer in nodejs/node#35889, we switched to ESM version globby because new version in ESM and we should move to ESM

@wood1986
Copy link
Author

But you may block people from using the latest version if you have features or bug fix afterwards.

@alexander-akait
Copy link
Member

But how I should fix it? I can't fix v8/Node.js bug here, revert to non ESM old version is not acceptable

@mariusvirb
Copy link

Thanks @alexander-akait for the info!
I'm experiencing this in v16.11.1, seems really like node issue 😢 will try to find a working node version, otherwise we're stuck with v9 for time being/

@alexander-akait
Copy link
Member

alexander-akait commented Nov 30, 2021

@mariusvirb For tests purpose you can bundle/transpile globby to commonjs, we use it https://github.com/webpack-contrib/copy-webpack-plugin/blob/master/globalSetup.js#L30 for testing, yes this is a very sad problem, my comment on it nodejs/node#35889 (comment)

@mariusvirb
Copy link

thanks @alexander-akait it's not a high priority for us right now, but I'll definitely take a look! Seems a bunch of organizations are affected!

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

Successfully merging a pull request may close this issue.

3 participants