Has anyone encountered this issue when trying to use vue-twemoji-picker in a Vue + TypeScript project? I keep receiving the following error message. How can I fix this?
7:31 Could not find a declaration file for module '@kevinfaguiar/vue-twemoji-picker'. '/Users/owner/WebstormProjects/audilet/node_modules/@kevinfaguiar/vue-twemoji-picker/dist/vue-twemoji-picker.umd.min.js' implicitly has an 'any' type.
Try `npm install @types/kevinfaguiar__vue-twemoji-picker` if it exists or add a new declaration (.d.ts) file containing `declare module '@kevinfaguiar/vue-twemoji-picker';`
5 |
6 | <script lang="ts">
> 7 | import { TwemojiPicker } from '@kevinfaguiar/vue-twemoji-picker';
| ^
8 | import {Component, Prop, Vue} from "vue-property-decorator";
9 |
10 | @Component
I attempted to resolve this by running
yarn add -D @types/kevinfaguiar__vue-twemoji-picker
, but it seems the package was not found. (It appears that the vue-twemoji-picker project already includes tsconfig.json
and *.d.ts
files in its repository, so this step may not be necessary.)
This is the code snippet causing the problem:
<template>
<div>test</div>
</template>
<script lang="ts">
import { TwemojiPicker } from '@kevinfaguiar/vue-twemoji-picker';
import {Component, Prop, Vue} from "vue-property-decorator";
@Component
export default class SampleComponent extends Vue {
}
</script>