Could not find a type declaration file
See original GitHub issueHello 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:
- Created 3 years ago
- Comments:12 (7 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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!
Alright, you did a good job here.
I’m going to do a test with it.