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

299
Vistas
Encountering errors while trying to import node modules in Vue 3 (I'm not using typescript)

I've installed KaTeX using the command npm install katex in my vue3 project.

However, when I try to import the katex module using the following code import katex from 'katex' inside my scripts section, vscode shows this error :

Could not find a declaration file for module 'katex'. 'c:/Users/User/Documents/vue/addsub/math/node_modules/katex/dist/katex.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/katex` if it exists or add a new declaration (.d.ts) file containing `declare module 'katex';`Vetur(7016)
Could not find a declaration file for module 'katex'. 'C:/Users/User/Documents/vue/addsub/math/node_modules/katex/dist/katex.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/katex` if it exists or add a new declaration (.d.ts) file containing `declare module 'katex';`ts(7016)

Can someone help me understand what is the issue ?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

When a module is not yours - try to install types from @types:

npm install -D @types/module-name

If the above install errors - try changing import statements to require:

// import * as yourModuleName from 'module-name';
const yourModuleName = require('module-name');
about 4 years ago · Juan Pablo Isaza Denunciar
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