我只是尝试在我的应用程序中使用这个包(vue-prism-editor)vuejs 3,但我总是收到如前所述的错误。
TS7016: Could not find a declaration file for module 'prismjs/components/prism-core'. 'C:/Sibeesh/GitHub/vue-resume/node_modules/prismjs/components/prism-core.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/prismjs` if it exists or add a new declaration (.d.ts) file containing `declare module 'prismjs/components/prism-core';`
Run Code Online (Sandbox Code Playgroud)
我确实安装了,@types/prismjs但没有运气。我跟着自述文件中提到的步骤进行了完全相同的尝试。
下面是我的package.json文件。
{
"name": "vue-resume",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"core-js": "^3.6.5",
"jsoneditor": "^9.2.0",
"vue": "^3.0.0",
"vue-class-component": "^8.0.0-0",
"vue-prism-editor": "^2.0.0-alpha.2", …Run Code Online (Sandbox Code Playgroud)