Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup: space
  • Loading branch information
guybedford committed Jul 12, 2021
commit 8b6d578e781408f195e0673ddd98ff30a8d92033
2 changes: 1 addition & 1 deletion lib/internal/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -1470,7 +1470,7 @@ E('ERR_REQUIRE_ESM',
'file whose nearest parent package.json contains "type": "module" ' +
'which declares all .js files in that package scope as ES modules.' +
`\nInstead rename ${basename} to end in .cjs, change the requiring ` +
'code to use dynamic import() which is available in all CommonJS' +
'code to use dynamic import() which is available in all CommonJS ' +
`modules, or remove "type": "module" from ${packageJsonPath} to ` +
'treat all .js files as CommonJS (using .mjs for all ES modules ' +
'instead).\n';
Expand Down
2 changes: 1 addition & 1 deletion test/es-module/test-cjs-esm-warn.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const pjson = path.resolve(
requiringCjsAsEsm} not supported.\n`));
assert.ok(stderr.includes(
`Instead rename ${basename} to end in .cjs, change the requiring ` +
'code to use dynamic import() which is available in all CommonJS' +
'code to use dynamic import() which is available in all CommonJS ' +
`modules, or remove "type": "module" from ${pjson} to ` +
Comment thread
guybedford marked this conversation as resolved.
Resolved
'treat all .js files as CommonJS (using .mjs for all ES modules ' +
'instead).\n'));
Expand Down