Vue3使用第三方插件,报找不到模块错误是怎么回事啊?

项目是Vue3+ts+vite,全局引入第三方插件比如 Vue Cropper、V3-Scroll总是报错,都是按照官方文档安装配置的,请问是什么原因啊?

img

img

vue cropper报错

img


V3-Scroll报错

ts.config,json配置一下

{
  "compilerOptions": {
    "target": "esnext",
    "useDefineForClassFields": true,
    "module": "esnext",
    "moduleResolution": "node",
    "strict": true,
    "jsx": "preserve",
    "sourceMap": true,
    "resolveJsonModule": true,
    "esModuleInterop": true,
    "lib": ["esnext", "dom"],
    "baseUrl": ".",
    "allowJs": true,
    "paths": {
      "@/*": ["src/*"]
    },
    "skipLibCheck": true /* Skip type checking all .d.ts files. */,
    "allowSyntheticDefaultImports": true /* 允许默认导入 */,
    "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
    "types": ["element-plus/global"],
    "typeRoots": [
      "./node_modules/@types/",
      "./types"
    ] /* 指定多个文件夹,这些文件夹的作用类似于 './node_modules/@types'. */
  },
  "include": ["src/**/*.ts", "src/**/*.vue", "types/**/*.d.ts"],
  "exclude": ["node_modules", "dist", "**/*.js"]
}

js ?还是ts