unplugin-icons icon indicating copy to clipboard operation
unplugin-icons copied to clipboard

vite / vue-tsc compiler error

Open theoephraim opened this issue 3 years ago • 2 comments

Not exactly sure when this started, but I'm getting an error when running vue-tsc (TS typechecking for vue) related to this plugin

running vue-tsc --noEmit gives me the following error

node_modules/unplugin-icons/dist/vite.d.ts:4:60 - error TS2304: Cannot find name 'Plugin$1'.

declare const _default: (options?: Options | undefined) => Plugin$1;
                                                           ~~~~~~~~

My tsconfig:

{
  "compilerOptions": {
    "target": "ESNext",
    "module": "ESNext",
    "moduleResolution": "node",
    "strict": true,
    "jsx": "preserve",
    "sourceMap": true,
    "resolveJsonModule": true,
    "esModuleInterop": true,
    "experimentalDecorators": true,
    "allowUnreachableCode": true,
    "lib": ["ESNext", "dom"],
    "types": [
      "node",
      "vite/client",
      "unplugin-icons/types/vue"
    ],
    "baseUrl": "./",
    "paths": {
      "@/*": ["src/*"],
    }
  },
  "include": [
    "**/*.ts",
    "**/*.js",
    "src/**/*.tsx",
    "src/**/*.vue"
  ]
}

theoephraim avatar Jan 28 '22 19:01 theoephraim

The same to me. Any solution on this one guys ?

trathailoi avatar Feb 14 '22 08:02 trathailoi

Same here, i've managed to isolate the issue to Typescript 4.5+, it goes away when you activate the compilerOptions.skipLibCheck: true in your tsconfig file

hugazo avatar Apr 06 '22 02:04 hugazo