Repository: node
Issue: `import.meta.url` is undefined when using stdin such as `... | node --input-type=module -` 
Labels: esm

<!--
Thank you for reporting an issue.

This issue tracker is for bugs and issues found within Node.js core.
If you require more general support please file an issue on our help
repo. https://github.com/nodejs/help


Please fill in as much of the template below as you're able.

Version: output of `node -v`
Platform: output of `uname -a` (UNIX), or output of `"$([Environment]::OSVersion | ForEach-Object VersionString) $(if ([Environment]::Is64BitOperatingSystem) { "x64" } else { "x86" })"` in PowerShell console (Windows)
Subsystem: if known, please specify affected core module name
-->

* **Version**: 16.1.0
* **Platform**: Linux
* **Subsystem**:

### What steps will reproduce the bug?

I write TypeScript which Node doesn't read so I write `esbuild thefile.ts | node --input-type=module -` to strip the TS typings and pass the ESM directly to Node. This works 💯👍

However, if the code uses `import.meta.url` such as `const __dirname = path.dirname(fileURLToPath(import.meta.url));` this throws:

```
node:internal/process/esm_loader:74
    internalBinding('errors').triggerUncaughtException(
                              ^

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string or an instance of URL. Received undefined
    at new NodeError (node:internal/errors:363:5)
    at fileURLToPath (node:internal/url:1372:11)
    at file:///home/today/_/work/acorn-macros/test/style.macro/[eval1]:12:32
    at ModuleJob.run (node:internal/modules/esm/module_job:175:25)
    at async Loader.eval (node:internal/modules/esm/loader:170:24)
    at async node:internal/process/execution:49:24
    at async loadESM (node:internal/process/esm_loader:68:5) {
  code: 'ERR_INVALID_ARG_TYPE'
}
```

Because `import.meta.url` is undefined. Shouldn't it be "file:///home/today/_/work/acorn-macros/test/style.macro/[eval1]" since that's what's shown in the stacktrace?

<!--
Enter details about your bug, preferably a simple code snippet that can be
run using `node` directly without installing third-party dependencies.
-->

### How often does it reproduce? Is there a required condition?

Using `import.meta.url` when accepting a script via stdin.

```
> echo "console.log(import.meta.url)" | node --input-type=module
undefined
```

### What is the expected behavior?

The `url` property is "file:///home/today/_/work/acorn-macros/test/style.macro/[eval1]" 

```
> echo "console.log(import.meta.url)" | node --input-type=module
file:///the/real/path/[eval1]
```

As a workaround you can hack this in via:

```js
if (import.meta.url === undefined) {
  try {
    throw new Error();
  } catch (e) {
    const url = /at (.+):\d+:\d+$/.exec(e.stack.split('\n')[1])[1];
    console.log('Reset to', url); // Logs "Reset to file:///home/today/_/work/acorn-macros/test/style.macro/[eval1]"
    import.meta.url = url;
  }
}
// ... now carry on as normal, no errors: 
const __dirname = path.dirname(fileURLToPath(import.meta.url));
```

<!--
If possible please provide textual output instead of screenshots.
-->

### What do you see instead?

Throws :(

<!--
If possible please provide textual output instead of screenshots.
-->

### Additional information

Thank you for maintaining a wonderful project and doing all the work to make ESM in Node a success! ✨

<!--
Tell us anything else you think we should know.
-->