Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

104
Views
typescript SDK import declaration file error

I am integrating typescript SDK with a simple typescript program the SDK is installed in the node modules it's tsconfig file looks like this

  {
  "include": ["src", "types"],
  "compilerOptions": {
    "module": "esnext",
    "lib": ["esnext"],
    "importHelpers": true,
    "declaration": true,
    "sourceMap": true,
    "rootDir": "./src",
    "strict": true,
    "noUnusedLocals": true,
    "noUnusedParameters": true,
    "noImplicitReturns": true,
    "noFallthroughCasesInSwitch": true,
    "moduleResolution": "node",
    "target": "ES2017", 
    "jsx": "react",
    "esModuleInterop": true
  }
}

and the package.json has following dependencies

"devDependencies": {
"stream-equal": "^2.0.1",
"tsdx": "^0.14.1",
"tslib": "^2.1.0",
"typescript": "^3.9.7"
 }

When I am importing the SDK it is giving me error so I changed the module from commonJs to esnext & target to ES2017 so that it matches with the library /SDK installed but still error

    ERROR in ../../../Downloads/MessageMedia(1)/dist/index.js 7:2-66
Module not found: Error: Can't resolve './messagemedialib.cjs.development.js' in 'C:\Users\User\Downloads\MessageMedia(1)\dist'    
 @ ./src/index.ts 12:0-77 13:19-25 18:31-49

ERROR in C:\Users\User\Desktop\WebpackTS\project1\src\index.ts
./src/index.ts 1:53-86
[tsl] ERROR in C:\Users\User\Desktop\WebpackTS\project1\src\index.ts(1,54)
      TS7016: Could not find a declaration file for module '../node_modules/messagemedialib'. 'C:\Users\User\Desktop\WebpackTS\project1\node_modules\messagemedialib\dist\index.js' implicitly has an 'any' type.

2 errors have detailed information that is not shown.
Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.

webpack 5.64.0 compiled with 3 errors and 2 warnings in 3868 ms

I am using webpack for compilation

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!