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 authored Jan 29, 2024
1 parent da1a88c commit 201ac05
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 @@ -2989,11 +2989,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 201ac05

Please sign in to comment.