Skip to content

Commit

Permalink
Update doc/api/errors.md
Browse files Browse the repository at this point in the history
  • Loading branch information
aduh95 committed Jan 31, 2024
1 parent 24afb0b commit ac5dab9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doc/api/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -2970,11 +2970,11 @@ importing or calling `import.meta.resolve()` with either:
is not `file`.
* a [relative URL][] from a module whose URL scheme is not a [special scheme][].

```js
```mjs
try {
// Trying to import the package 'bare-specifier' from a `data:` URL module:
await import("data:text/javascript,import%22bare-specifier%22");
} catch(e) {
await import('data:text/javascript,import "bare-specifier"');
} catch (e) {
console.log(e.code); // ERR_UNSUPPORTED_RESOLVE_REQUEST
}
```
Expand Down

0 comments on commit ac5dab9

Please sign in to comment.