TS2617

error TS2617: path can only be imported by using import path = require("node:path") or by turning on the esModuleInterop flag and using a default import.

Broken Code ❌

1
import { path } from "node:path";

Fixed Code ✔️

1
import path = require('node:path');