question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Could not find a declaration file for module 'vee-validate/dist/locale/en'.

See original GitHub issue

Versions

And I get a TS warning

[ts] Could not find a declaration file for module 'vee-validate/dist/locale/en'. '/Users/.../node_modules/vee-validate/dist/locale/en.js' implicitly has an 'any' type. Try npm install @types/vee-validateif it exists or add a new declaration (.d.ts) file containingdeclare module ‘vee-validate’; module "/Users/.../node_modules/vee-validate/dist/locale/en"

Expected behavior I should not get a warning using ES6 … why there is no @types/vee-validate` file available to be installed via npm ?

Desktop (please complete the following information):

  • OS: OSX
  • Browser Chrome

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
erenalidalcommented, Feb 1, 2019

// vee-validate.d.ts

declare module 'vee-validate*'; or

declare module 'vee-validate'
declare module 'vee-validate/*';

or

declare module 'vee-validate'
declare module 'vee-validate/dist/locale/tr';
declare module 'vee-validate/dist/locale/en';
.
.
.

or

declare module 'vee-validate'
declare module 'vee-validate/dist/locale/*';

fixed my problem.

0reactions
kolyanlavrovcommented, Mar 14, 2022

found a solution 👍

  If you're importing a third-party module 'foo' that doesn't provide any typings, either in the library itself, or in the @types/foo package (generated from the DefinitelyTyped repository), then you can make this error go away by declaring the module in a .d.ts file:

  // vee-validate.d.ts
  declare module 'vee-validate'

in which folder did you create this file?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Could not find a declaration file for module 'module-name ...
Here are two other solutions. When a module is not yours - try to install types from @types : npm install -D @types/module-name....
Read more >
How to fix error TS7016: Could not find a declaration file for ...
Try `npm install @types/XYZ` if it exists or add a new declaration (.d.ts) file containing `declare module 'XYZ';. If XYZ is a direct...
Read more >
Fixing the TS7016 Error | Atomist Blog
Could not find declaration file -- How do you get past the TS7016? This article highlights the eight best and worst fixes.
Read more >
Could not find a declaration file for module 'ava ... - GitHub
My test code is written in TypeScript but the type declarations cannot be found when using ava version 4. With ava version 3...
Read more >
Error: Could not find a declaration file for module - YouTube
Fix error: Could not find a declaration file for module ... implicitly has an 'any' type.Try npm install library-name if it exists or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found