Skip to content

Instantly share code, notes, and snippets.

@gregbarcza
Last active December 11, 2021 17:23
Show Gist options
  • Save gregbarcza/e819ff1c968df279eccaf53e6cf66d64 to your computer and use it in GitHub Desktop.
Save gregbarcza/e819ff1c968df279eccaf53e6cf66d64 to your computer and use it in GitHub Desktop.
got ERR_REQUIRE_ESM error
node_modules
yarn.lock
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const got_1 = __importDefault(require("got"));
got_1.default.get('asd');
import got from 'got'
got.get('asd')
{
"devDependencies": {
"typescript": "^4.5.3"
},
"dependencies": {
"got": "^12.0.0"
}
}
{
"display": "Node 16",
"compilerOptions": {
"lib": [
"es2021"
],
"module": "commonjs",
"target": "es2021",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment