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

ESM regression on Node.js 15.9 #11093

Closed
ai opened this issue Feb 18, 2021 · 3 comments Β· Fixed by #11150
Closed

ESM regression on Node.js 15.9 #11093

ai opened this issue Feb 18, 2021 · 3 comments Β· Fixed by #11150

Comments

@ai
Copy link
Contributor

ai commented Feb 18, 2021

πŸ› Bug Report

After upgrading Node.js 15.8 β†’ 15.9 jest@next stopped supporting ESM.

I created an issue in Node.js repo as well nodejs/node#37426

To Reproduce

echo '{ "private": true, "type": "module" }' > package.json
yarn add nanoevents
echo "import { createNanoEvents } from 'nanoevents'" > index.js
echo "import './index.js'; it.todo('test')" > index.test.js
yarn add jest@next

volta install node@15.9
node --experimental-vm-modules node_modules/.bin/jest

(node:60418) ExperimentalWarning: VM Modules is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
 FAIL  ./index.test.js
  ● Test suite failed to run

    linking error, dependency promises must be resolved on instantiate

Expected behavior

volta install node@15.8
node --experimental-vm-modules node_modules/.bin/jest

(node:60479) ExperimentalWarning: VM Modules is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
 PASS  ./index.test.js
  ✎ todo test

Test Suites: 1 passed, 1 total
Tests:       1 todo, 1 total
Snapshots:   0 total
Time:        0.173 s
Ran all test suites.

envinfo

  System:
    OS: Linux 5.10 Fedora 33 (Workstation Edition) 33 (Workstation Edition)
    CPU: (8) x64 Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz
  Binaries:
    Node: 15.8.0 - ~/.volta/tools/image/node/15.8.0/bin/node
    Yarn: 1.22.10 - ~/.volta/tools/image/yarn/1.22.10/bin/yarn
    npm: 7.5.1 - ~/.volta/tools/image/node/15.8.0/bin/npm
  npmPackages:
    jest: ^27.0.0-next.2 => 27.0.0-next.2
@ai
Copy link
Contributor Author

ai commented Feb 18, 2021

Can be caused by some extra checks in nodejs/node#37300

@SimenB
Copy link
Member

SimenB commented Mar 8, 2021

@ai fix is out in next.4

@github-actions
Copy link

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 May 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants