标签: vue-prism-editor

找不到模块“prismjs/components/prism-core”vue-prism-editor 的声明文件

我只是尝试在我的应用程序中使用这个包(vue-prism-editorvuejs 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)

vue.js vue-component vuejs2 vuejs3 vue-prism-editor

5
推荐指数
1
解决办法
6023
查看次数

标签 统计

vue-component ×1

vue-prism-editor ×1

vue.js ×1

vuejs2 ×1

vuejs3 ×1