tronprotocol / tronweb

Javascript API Library for interacting with the TRON Network
MIT License
423 stars 271 forks source link

tsc error 'AxiosHeaders' refers to a value, but is being used as a type here #543

Open mattiaferrari02 opened 1 month ago

mattiaferrari02 commented 1 month ago

I'm using tronweb version 6.0.0-beta.4. When i try to use tsc command i get this error

node_modules/tronweb/lib/commonjs/types/Providers.d.ts:2:52 - error TS2749: 'AxiosHeaders' refers to a value, but is being used as a type here. Did you mean 'typeof AxiosHeaders'

here's my tsconfig

{
    "compilerOptions": {
      "rootDir": "src",
      "outDir": "dist",
      "strict": true,
      "target": "es6",
      "module": "Node16",
      "sourceMap": true,
      "esModuleInterop": true,
      "moduleResolution": "node16",
      "typeRoots": [
        "node_modules/@types",
        "src/types"
      ]
    },
    "include": [
      "src/**/*.ts",
      "src/**/*.d.ts"
    ]
  }
start940315 commented 1 month ago

Change the moduleResolution to node and it will fix the problem. Later we'll fix this problem.