Compiling error after upgrading the proxy-agent version
starchx opened this issue · 1 comments
starchx commented
Hi Team, after upgrading:
"proxy-agent": "~3.1.1",
to
"proxy-agent": "~4.0.1",
Getting error:
../common/temp/node_modules/agent-base/dist/src/index.d.ts(2,8): error TS1192: Module '"net"' has no default export.
../common/temp/node_modules/agent-base/dist/src/index.d.ts(3,8): error TS1192: Module '"http"' has no default export.
../common/temp/node_modules/agent-base/dist/src/index.d.ts(4,8): error TS1192: Module '"https"' has no default export.
Is this because those modules are actually missing or because my TS config settings?
# tsconfig.json
{
"compilerOptions": {
"target": "es2018",
"module": "commonjs",
"outDir": "dist/",
"lib": [
"es6",
"es2018"
],
"strict": true,
"moduleResolution": "node",
"esModuleInterop": false,
"resolveJsonModule": true,
"forceConsistentCasingInFileNames": true,
"declaration": true,
"noImplicitAny": false,
"strictNullChecks": true,
"noImplicitThis": true,
"alwaysStrict": true,
"incremental": true,
"noUnusedLocals": false,
"noUnusedParameters": false,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": false,
"inlineSourceMap": true,
"inlineSources": true,
"experimentalDecorators": true,
"strictPropertyInitialization": false,
"typeRoots": [
"./node_modules/@types"
],
"types": ["jest", "node"]
},
"exclude": [
"node_modules",
"dist",
"src/ui",
]
}
TooTallNate commented
You need "esModuleInterop": true
. Patches welcome to make the import statements compatible when this option is disabled.