technowledgy / vue-h5p

A vue h5p component for h5p content
MIT License
16 stars 13 forks source link

Error Vetur(7016): Could not find a declaration file for module 'vue-h5p' #130

Closed skaspy closed 1 year ago

skaspy commented 2 years ago

Hi! I try to use the vue-h5p component in my Vue3 project that uses JS. I followed the instructions strictly but keep running into the error Vetur(7016) when I try to import h5p from 'vue-h5p'.

The error message in VS Code reads:

Could not find a declaration file for module 'vue-h5p'. 'd:/h5p-my-example/node_modules/vue-h5p/dist/cjs/vue-h5p.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/vue-h5p` if it exists or add a new declaration (.d.ts) file containing `declare module 'vue-h5p';

I tried yarn add @types/vue-h5p --save-dev but it did not work since @types/vue-h5p does not exist within the node_modules.

I figured the error has something to do with TypeScript. My app, however, is written in JS and GitHub says vue-h5p is written in JS too. I am confused - I have no knowledge of TS. How can I fix this?

wolfgangwalther commented 2 years ago

I haven't tried to use vue-h5p with vue 3, yet. Might be a vue 3 related problem. I have no experience with typescript either.

zengry commented 1 year ago

did you figure out ? same problem with vue-i18n .

skaspy commented 1 year ago

No, sadly not. I gave up and changed my stack early on from Laravel+Vue to Laravel+Livewire. The original tunapanda/h5p-standalone runs smoothly in PHP.