From 4ebe3bdb06a4d539cc8991e1241aa3150100f866 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Mon, 17 Jul 2023 16:19:00 -0400 Subject: fix(node): improve error message requiring non-npm es module (#19856) Closes #19842 Closes #16913 --- cli/tests/testdata/npm/cjs_require_esm_error/main.out | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'cli/tests/testdata/npm/cjs_require_esm_error/main.out') diff --git a/cli/tests/testdata/npm/cjs_require_esm_error/main.out b/cli/tests/testdata/npm/cjs_require_esm_error/main.out index dcb3d15b7..5c735b3a6 100644 --- a/cli/tests/testdata/npm/cjs_require_esm_error/main.out +++ b/cli/tests/testdata/npm/cjs_require_esm_error/main.out @@ -1,4 +1,2 @@ -error: Uncaught Error: [ERR_REQUIRE_ESM]: require() of ES Module [WILDCARD]my_esm_module.js from [WILDCARD]index.js not supported. Instead change the require to a dynamic import() which is available in all CommonJS modules. - at Object.Module._extensions..js (node:module:[WILDCARD]) +error: Uncaught Error: require() of ES Module [WILDCARD]my_esm_module.js from [WILDCARD]index.js not supported. Instead change the require to a dynamic import() which is available in all CommonJS modules. [WILDCARD] - at Module.load (node:module:[WILDCARD]) -- cgit v1.2.3