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 type declaration file 

See original GitHub issue

Hello at the import:

import Loading from 'vue-loading-overlay';

I am getting:

TS7016 Could not find a declaration file for module 'vue-loading-overlay'. '/Users/u2007750/cc/develop/projects/template/src/frontend/node_modules/vue-loading-overlay/dist/vue-loading.js' implicitly has an 'any' type.

Try npm install @types/vue-loading-overlay if it exists or add a new declaration (.d.ts) file containing declare module 'vue-loading-overlay';

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
yingshaoxocommented, Sep 13, 2021

I dont care if it does not work with element-plus card. If you want me to debug, report an issue with steps.

You are the boss

Suddenly, I know where I got wrong.

I didn’t import the css file: import "vue-loading-overlay/dist/vue-loading.css";


By the way, I made a repository for the testing. And I think it indeed does not work with the element card. But it’s ok if we put it into a div.

If you still interested in make it workable under the element plus-card, check this: https://github.com/yingshaoxo/typescript-elementplus-vue-loading-overlay-example


Thanks for your amazing work!

0reactions
yingshaoxocommented, Sep 14, 2021
 vld-parent

Alright, you did a good job here.

I’m going to do a test with it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Could not find a declaration file for module 'module-name ...
In order for this to work, I had to make declare module '...' the first line of code in the module.d.ts file, and...
Read more >
Could not find declaration file for module 'lodash' | bobbyhadz
The error "could not find declaration file for module 'lodash'" occurs when TypeScript cannot find the type declaration for a lodash-related module.
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
4 Terrible Ways (and 4 Better Ways) to fix 'TS7016: Could not find declaration file' · Caveat: the compiler option --noEmitOnError makes ...
Read more >
Missing type declaration files. Could not find a ... - GitHub
Could not find a declaration file for module 'tiptap-vuetify'. '/tmp/test/tiptap-vuetify/dist/bundle-umd.js' implicitly has an 'any' type.
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