Reputation: 9
I am using Vue 3 (Composition Api), Vite and Typescript. I got missing module of vue-prism-component.
<script lang="ts" setup>
import 'prismjs'
import 'prismjs/themes/prism-tomorrow.css'
import Prism from 'vue-prism-component'
</script>
Could not find a declaration file for module 'vue-prism-component'. '/Users/haotranhuynhhuy/Desktop/Vuejs/jarvis 2.0/node_modules/vue-prism-component/dist/vue-prism-component.common.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/vue-prism-component` if it exists or add a new declaration (.d.ts) file containing `declare module 'vue-prism-component';`
3 import Prism from 'vue-prism-component'
Can not install library @types/vue-prism-component because it not exist.
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@types%2fvue-prism-component - Not found
npm ERR! 404 '@types/vue-prism-component@*' is not in this registry.
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/haotranhuynhhuy/.npm/_logs/2022-12-16T07_22_15_496Z-debug-0.log
Try to declear file for module 'vue-prism-component'.
Upvotes: 1
Views: 498