Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

301
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda