Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Vite fresh install: TypeScript error for vitest.config.ts #317

Closed
@marvhock

Description

@marvhock

See issueon Discord

Hi!

I just made a fresh install (vue@3.3.4, vite@4.4.6)npm init vue@latest.
Sadly I have a TS Error in vitest.config.ts:7

  viteConfig,  defineConfig({    test: {      environment: 'jsdom',      exclude: [...configDefaults.exclude, 'e2e/*'],      root: fileURLToPath(new URL('./', import.meta.url)),      transformMode: {        web: [/\.[jt]sx$/]      }    }  }))

The Error says the following.
S2345: Argument of type 'UserConfigExport' is not assignable to parameter of type 'UserConfig | Promise'.   Type 'UserConfigFn' is not assignable to type 'UserConfig | Promise'.

Question:

  • Can I fix it, or is it only able inside the Vite Package itself? Is there an Update to fix that?
  • Is it bad to have a TS error (like that) on a fresh install. Should I worry about TS Errors or are they not important?

How to Reproduce

  1. Open Terminal on mac, runnpm create vite@latest
  2. Follow the install instructions using: TS, TSX, VueRouter, Piania, Vitest, Cypress, ESlint, prettier
  3. run. cd && npm i && npm run format && npm run dev
  4. In Webstorm I get that error in the file after File-Indexing is finished in Webstorm

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp