TypeError: Method called on incompatible receiverTypeError: Method called on incompatible receiver
A method was called with a 'this' value that is not the expected type.
ERR_REQUIRE_ESMA require() call was used to load an ES module, which is not allowed.
The package you are requiring is an ES-module-only package (has "type": "module" or exports .mjs files). CommonJS require() cannot load ES modules. Many popular packages have migrated to ESM-only.
Switch to dynamic import: const pkg = await import('package'). Or convert your project to ES modules by adding "type": "module" to package.json. Alternatively, use an older version of the package that still supports CommonJS.
const pkg = require('esm-only-package'); // ERR_REQUIRE_ESMTypeError: Method called on incompatible receiverA method was called with a 'this' value that is not the expected type.
ERR_ASYNC_CALLBACKA non-function value was passed where an async callback was expected.
ReferenceErrorA reference was made to a variable that does not exist in the current scope.
ReferenceError: Cannot access before initializationA variable declared with let or const was accessed before its declaration in the temporal dead zone.
SyntaxErrorThe JavaScript engine encountered code that does not conform to the language syntax.
TypeError: Cannot convert a Symbol value to a stringAn implicit conversion of a Symbol to a string was attempted, which is not allowed.