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

Investigate flaky test - esm_display_syntax_error_import_json_named_export #40738

Closed
targos opened this issue Nov 6, 2021 · 0 comments
Closed
Labels
esm Issues and PRs related to the ECMAScript Modules implementation. flaky-test Issues and PRs related to the tests with unstable failures on the CI.

Comments

@targos
Copy link
Member

targos commented Nov 6, 2021

Test

message/esm_display_syntax_error_import_json_named_export

Platform

Does not seem platform-specific

Console output

(node:11257) ExperimentalWarning: Importing JSON modules is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
file:///data/iojs/build/workspace/node-test-commit-linuxone/test/message/esm_display_syntax_error_import_json_named_export.mjs:4
import { ofLife } from '../fixtures/experimental.json' assert { type: 'json' };
         ^^^^^^
SyntaxError: The requested module '../fixtures/experimental.json' does not provide an export named 'ofLife'
    at ModuleJob._instantiate (node:internal/modules/esm/module_job:127:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:191:5)
    at async Promise.all (index 0)
    at async ESMLoader.import (node:internal/modules/esm/loader:331:24)
    at async loadESM (node:internal/process/esm_loader:88:5)
    at async handleMainPromise (node:internal/modules/run_main:65:12)

Node.js v18.0.0-pre

Build links

Additional information

The test seems to fail because of the first two lines that come from the experimental warning.
These lines are not in the .out file, which seems like a mistake, but I don't understand why the test is not failing consistently on all platforms.

/cc @aduh95

@targos targos added the flaky-test Issues and PRs related to the tests with unstable failures on the CI. label Nov 6, 2021
aduh95 added a commit to aduh95/node that referenced this issue Nov 6, 2021
@Mesteery Mesteery added the esm Issues and PRs related to the ECMAScript Modules implementation. label Nov 6, 2021
@targos targos closed this as completed in a420da6 Nov 8, 2021
targos pushed a commit that referenced this issue Nov 8, 2021
Fixes: #40738

PR-URL: #40739
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
aduh95 added a commit to aduh95/node that referenced this issue Jan 30, 2022
Fixes: nodejs#40738

PR-URL: nodejs#40739
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
aduh95 added a commit to aduh95/node that referenced this issue Jan 31, 2022
Fixes: nodejs#40738

PR-URL: nodejs#40739
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
danielleadams pushed a commit that referenced this issue Feb 1, 2022
Fixes: #40738

PR-URL: #40739
Backport-PR-URL: #41776
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
esm Issues and PRs related to the ECMAScript Modules implementation. flaky-test Issues and PRs related to the tests with unstable failures on the CI.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants