// This works
import{fileURLToPath}from'node:url';// This fails because of import.meta.url
const__dirname=path.dirname(fileURLToPath(import.meta.url));
SyntaxError: Cannot use 'import.meta' outside a module
This code will still fail:
```ts
// This works
import {fileURLToPath} from 'node:url';
// This fails because of import.meta.url
const __dirname = path.dirname(fileURLToPath(import.meta.url));
```
https://github.com/sindresorhus/term-size/blob/main/index.js#L6
The error is:
```
SyntaxError: Cannot use 'import.meta' outside a module
```
This code will still fail:
https://github.com/sindresorhus/term-size/blob/main/index.js#L6
The error is:
aabluedragon referenced this issue 2 years agoaabluedragon referenced this issue 2 years agoaabluedragon referenced this issue 2 years ago