src/utils.ts:4:47 - error TS7016: Could not find a declaration file for module 'hpagent'. '/home/maxim/google-api-typings-generator/node_modules/hpagent/index.mjs' implicitly has an 'any' type.
Try `npm i --save-dev @types/hpagent` if it exists or add a new declaration (.d.ts) file containing `declare module 'hpagent';`
4 import {HttpProxyAgent, HttpsProxyAgent} from 'hpagent';
As suggested in https://github.com/sindresorhus/got/issues/2051#issuecomment-1259401339 I changed my
moduleResolution
to benode16
. And I get this error:Project: https://github.com/Maxim-Mazurok/google-api-typings-generator/blob/master/src/utils.ts#L4
Workaround:
exports
inhpagent/package.json
to be"exports": "./index.js",
npx patch-package hpagent --exclude 'nothing'
Patch: