TypeError: "x" is not a function — Causes and Fixes
TypeError: x is not a function fires when you call a value that isn't callable — a typo, a lost `this`, or the wrong shape from an API. Here's how to fix each case.
TypeError: x is not a function fires when you call a value that isn't callable — a typo, a lost `this`, or the wrong shape from an API. Here's how to fix each case.
Fix Node's 'ReferenceError: require is not defined in ES module scope' and its __dirname sibling using createRequire and import.meta.