vue-cal
vue-cal copied to clipboard
Failed to resolve module specifier "vue-cal"
After install npm i vue-cal
and in my js file:
import VueCal from 'vue-cal'
import 'vue-cal/dist/vuecal.css'
failed to import with this error message:
Failed to resolve module specifier "vue-cal"
If you are using Vue-cal in Vue + Typescript project, then you can't using module. Because author not add type defenitions to source code (*.d.ts files). You have 2 methods:
- Easy method: Add 2 lines to tsconfig.json file in your project folder. This switch off type checking in imported JS modules. { "compilerOptions": { ... "noImplicitAny": false, "allowJs": true, ... } }
- Advanced method. Write .d.ts file yourself to complete type checking. Info https://www.typescriptlang.org/docs/handbook/declaration-files/introduction.html
Today I also met with the same problem. Solved using first method. I hope the author will add the necessary files to the project to support Typescript. I'm busy at the moment, but as soon as I'm free I can help the author with Typescript
@snurbol #168
there is .d.ts
file for vue2, it might help you