I am facing an issue with my project where I have set up the latest dependencies using CLI 3. The problem arises when I try to import the font-picker-vue package into my project (the package installs successfully).
The error message reads:
Could not find a declaration file for module 'font-picker-vue'......../node_modules/font-picker-vue/lib/FontPicker.js' implicitly has an 'any' type.
Try npm install @types/font-picker-vue if it exists or add a new declaration (.d.ts) file containing declare module font-picker-vue';
After researching on Google, one of the suggested solutions was to include the following code in a *.d.ts
file:
src
declare module 'vuetify/lib' {
import 'vuetify/types/lib'
}
I created a *.d.ts
file at the root of the project as shown in the image below, hoping that it would resolve the issue, but unfortunately, it did not:
https://i.sstatic.net/9UI1i.png
Following another suggestion from a Stack Overflow response, I tried changing import statements to require syntax -
const yourModuleName = require('module-name');
and also attempted installing using npm install -D @types/font-picker-vue
. However, both methods failed as @types/font-picker-vue is not available in the npm registry.
I am unsure about how to fix this error. Any assistance in getting this working would be highly appreciated. Thank you.