Skip to content

When scaffolding new app, TypeScript Error in vitest.config.ts #313

Closed
@dustindowns

Description

@dustindowns

When scaffolding a new app with TypeScript and Vitest using npm init vue@latest, there's a TypeScript error in vitest.config.ts related with the usage of mergeConfig.

Argument of type 'UserConfigExport' is not assignable to parameter of type 'UserConfig | Promise'.
Type 'UserConfigFn' is not assignable to type 'UserConfig | Promise'.ts(2345)

It seems the actual types in use for the "mergeConfig" arguments are UserConfigExport, but "mergeConfig" is expecting them to be of type UserConfig.

Here are the prompt selections:
Screenshot 2023-07-10 at 9 30 50 AM

After installing dependencies, the following error shows up in vitest.config.ts:
Screenshot 2023-07-10 at 9 27 30 AM

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions