Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

106
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda