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

203
Views
Could not find a declaration file for module 'vue2-timepicker'

Summery

I added vue2-timepicker in my Typescript/Nuxt.js application.
But it is failed to import vue2-timepicker

import timepicker from 'vue2-timepicker'
Could not find a declaration file for module 'vue2-timepicker'.
'/home/jpskgc/sample-nuxt/node_modules/vue2-timepicker/dist/VueTimepicker.umd.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/vue2-timepicker` if it exists or add a new declaration (.d.ts) file containing `declare module 'vue2-timepicker';`

I want to resolve this problem.

Describe what I've tried.

I tried to add @types/vue2-timepicker, but it does not exist.

❯ yarn add @types/vue2-timepicker
yarn add v1.22.17
[1/4] Resolving packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/@types%2fvue2-timepicke: Not found".
info If you think this is a bug, please open a bug report with the information provided in "/home/jpskgc/sample-nuxt/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

Show some codes.

Here is the actual repository. Please check.
https://github.com/jpskgc/nuxt-sample/blob/main/components/registration-form/index.vue

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

As the types for the package are not available try ignoring them.

// @ts-ignore

The imported package would work just fine.

Other options would be to create dummy .d.ts definition which will allow to import anything from the module.

over 4 years ago · Santiago Trujillo 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!