diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2024-09-05 13:49:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-05 12:49:07 +0000 |
commit | 794d347ec68fa969ffed231d0844a59a215d2344 (patch) | |
tree | 237b26bba35eb570683de86f68e0bff9bde162dd /tests/specs/run/import_common_js/module_error.out | |
parent | dda63287456aae5cd4f7f428e23b52cb8c0005e5 (diff) |
fix: add suggestion how to fix importing CJS module (#21764)
```
$ cat exports_error.js
Object.defineProperty(exports, "__esModule", { value: true });
$ deno exports_error.js
error: Uncaught (in promise) ReferenceError: exports is not defined
Object.defineProperty(exports, "__esModule", { value: true });
^
at file:///exports_error.js:1:23
info: Deno doesn't support CommonJS modules without `.cjs` extension.
hint: Rewrite this module to ESM or change the file extension to `.cjs`.
```
Diffstat (limited to 'tests/specs/run/import_common_js/module_error.out')
-rw-r--r-- | tests/specs/run/import_common_js/module_error.out | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/specs/run/import_common_js/module_error.out b/tests/specs/run/import_common_js/module_error.out new file mode 100644 index 000000000..53a908d29 --- /dev/null +++ b/tests/specs/run/import_common_js/module_error.out @@ -0,0 +1,7 @@ +error: Uncaught (in promise) ReferenceError: module is not defined +module.exports = { +^ + at [WILDCARD]module_error.js:1:1 + + info: Deno does not support CommonJS modules without `.cjs` extension. + hint: Rewrite this module to ESM or change the file extension to `.cjs`. |