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

296
Views
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 answers
Answer question

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 Report
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!