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

[Bug]: import() results in segment fault #12286

Closed
vankop opened this issue Jan 31, 2022 · 4 comments
Closed

[Bug]: import() results in segment fault #12286

vankop opened this issue Jan 31, 2022 · 4 comments

Comments

@vankop
Copy link

vankop commented Jan 31, 2022

Version

27.3.1

Steps to reproduce

Tested with Node.js 16

  1. Clone repo https://github.com/vankop/webpack
  2. checkout to bug-with-running-esm-loader
  3. run yarn
  4. run node test/run-esm-loader.js it will print ok! this script has a small webpack build with one module + esm written loader
webpack(
	{
		mode: "production",
		entry: "./esm-loader-app.js",
		output: {
			path: path.resolve(__dirname, "./js/EsmLoader")
		},
		context: path.resolve(__dirname, "./fixtures")
	},
	err => (err ? console.error(err) : console.log("ok!"))
);

in esm-loader-app.js

require("./esm-loader.mjs!"); // this loader is esm module

All works fine with Node.js
5. run yarn jest test/EsmLoader.basictest.js
it fails with segment fault here
Note: just running eval('import("some-module")') in jest test file works

Expected behavior

Expected test finish successfully

Actual behavior

jest fall in segment fault..

Additional context

Looks like bug appears only when running in jest

Environment

full list of affected envs in webpack ci/cd

System:
    OS: macOS 12.0.1
    CPU: (8) arm64 Apple M1
  Binaries:
    Node: 16.13.2 - ~/.nvm/versions/node/v16.13.2/bin/node
    Yarn: 1.22.17 - ~/.nvm/versions/node/v16.13.2/bin/yarn
    npm: 8.1.2 - ~/.nvm/versions/node/v16.13.2/bin/npm
  npmPackages:
    jest: ^27.3.1 => 27.3.1
@SimenB
Copy link
Member

SimenB commented Feb 1, 2022

I assume this is our old friend nodejs/node#35889

@github-actions
Copy link

github-actions bot commented Mar 3, 2022

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions github-actions bot added the Stale label Mar 3, 2022
@SimenB
Copy link
Member

SimenB commented Mar 3, 2022

Nothing to suggest otherwise

@SimenB SimenB closed this as completed Mar 3, 2022
@github-actions
Copy link

github-actions bot commented Apr 3, 2022

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants