Skip to content

Failed to run typecheck command in vitest test code #30962

Open

Description

command: dev-tool run typecheck
package path: sdk\core\core-lro

error message:

$ dev-tool run typecheck
[typecheck] type-checking...
[typecheck] ../../../common/temp/node_modules/.pnpm/@types+chai@4.3.18/node_modules/@types/chai/index.d.ts:1:1 - error TS6200: Definitions of the following identifiers conflict with those in another file: Message, ObjectProperty, ChaiPlugin, AssertionArgs, Operator, OperatorComparable, AssertionError, chai

1 declare namespace Chai {
  ~~~~~~~

  ../../../common/temp/node_modules/.pnpm/@vitest+expect@2.0.5/node_modules/@vitest/expect/dist/chai.d.cts:16:1
    16 declare namespace Chai {
       ~~~~~~~
    Conflicts are in this file.
../../../common/temp/node_modules/.pnpm/@vitest+expect@2.0.5/node_modules/@vitest/expect/dist/chai.d.cts:16:1 - error TS6200: Definitions of the following identifiers conflict with those in another file: Message, ObjectProperty, ChaiPlugin, AssertionArgs, Operator, OperatorComparable, AssertionError, chai

16 declare namespace Chai {
   ~~~~~~~

  ../../../common/temp/node_modules/.pnpm/@types+chai@4.3.18/node_modules/@types/chai/index.d.ts:1:1
    1 declare namespace Chai {
      ~~~~~~~
    Conflicts are in this file.
../../../common/temp/node_modules/.pnpm/vite-node@2.0.5_@types+node@18.19.46/node_modules/vite-node/dist/index-CCsqCcr7.d.ts:88:14 - error TS2304: Cannot find name 'WebSocket'.

88   webSocket: WebSocket
                ~~~~~~~~~
../../../common/temp/node_modules/.pnpm/vite-node@2.0.5_@types+node@18.19.46/node_modules/vite-node/dist/server.d.ts:1:10 - error TS2305: Module '"vite"' has no exported member 'TransformResult'.

1 import { TransformResult, ViteDevServer } from 'vite';
           ~~~~~~~~~~~~~~~
../../../common/temp/node_modules/.pnpm/vite-node@2.0.5_@types+node@18.19.46/node_modules/vite-node/dist/server.d.ts:1:27 - error TS2305: Module '"vite"' has no exported member 'ViteDevServer'.

1 import { TransformResult, ViteDevServer } from 'vite';
                            ~~~~~~~~~~~~~
../../../common/temp/node_modules/.pnpm/vitest@2.0.5_@types+node@18.19.46_@vitest+browser@2.0.5/node_modules/vitest/dist/chunks/reporters.C_zwCd4j.d.ts:4:10 - error TS2305: Module '"vite"' has no exported member 'ViteDevServer'.

4 import { ViteDevServer, TransformResult as TransformResult$1, UserConfig as UserConfig$1, ConfigEnv, ServerOptions, DepOptimizationConfig, AliasOptions } from 'vite';
           ~~~~~~~~~~~~~
../../../common/temp/node_modules/.pnpm/vitest@2.0.5_@types+node@18.19.46_@vitest+browser@2.0.5/node_modules/vitest/dist/chunks/reporters.C_zwCd4j.d.ts:4:25 - error TS2305: Module '"vite"' has no exported member 'TransformResult'.

4 import { ViteDevServer, TransformResult as TransformResult$1, UserConfig as UserConfig$1, ConfigEnv, ServerOptions, DepOptimizationConfig, AliasOptions } from 'vite';
                          ~~~~~~~~~~~~~~~
../../../common/temp/node_modules/.pnpm/vitest@2.0.5_@types+node@18.19.46_@vitest+browser@2.0.5/node_modules/vitest/dist/chunks/reporters.C_zwCd4j.d.ts:4:63 - error TS2305: Module '"vite"' has no exported member 'UserConfig'.

4 import { ViteDevServer, TransformResult as TransformResult$1, UserConfig as UserConfig$1, ConfigEnv, ServerOptions, DepOptimizationConfig, AliasOptions } from 'vite';
                                                                ~~~~~~~~~~
../../../common/temp/node_modules/.pnpm/vitest@2.0.5_@types+node@18.19.46_@vitest+browser@2.0.5/node_modules/vitest/dist/chunks/reporters.C_zwCd4j.d.ts:4:91 - error TS2305: Module '"vite"' has no exported member 'ConfigEnv'.

4 import { ViteDevServer, TransformResult as TransformResult$1, UserConfig as UserConfig$1, ConfigEnv, ServerOptions, DepOptimizationConfig, AliasOptions } from 'vite';
                                                                                            ~~~~~~~~~
../../../common/temp/node_modules/.pnpm/vitest@2.0.5_@types+node@18.19.46_@vitest+browser@2.0.5/node_modules/vitest/dist/chunks/reporters.C_zwCd4j.d.ts:4:102 - error TS2305: Module '"vite"' has no exported member 'ServerOptions'.

4 import { ViteDevServer, TransformResult as TransformResult$1, UserConfig as UserConfig$1, ConfigEnv, ServerOptions, DepOptimizationConfig, AliasOptions } from 'vite';
                                                                                                       ~~~~~~~~~~~~~
../../../common/temp/node_modules/.pnpm/vitest@2.0.5_@types+node@18.19.46_@vitest+browser@2.0.5/node_modules/vitest/dist/chunks/reporters.C_zwCd4j.d.ts:4:117 - error TS2305: Module '"vite"' has no exported member 'DepOptimizationConfig'.

4 import { ViteDevServer, TransformResult as TransformResult$1, UserConfig as UserConfig$1, ConfigEnv, ServerOptions, DepOptimizationConfig, AliasOptions } from 'vite';
                                                                                                                      ~~~~~~~~~~~~~~~~~~~~~
../../../common/temp/node_modules/.pnpm/vitest@2.0.5_@types+node@18.19.46_@vitest+browser@2.0.5/node_modules/vitest/dist/chunks/reporters.C_zwCd4j.d.ts:4:140 - error TS2305: Module '"vite"' has no exported member 'AliasOptions'.

4 import { ViteDevServer, TransformResult as TransformResult$1, UserConfig as UserConfig$1, ConfigEnv, ServerOptions, DepOptimizationConfig, AliasOptions } from 'vite';
                                                                                                                                             ~~~~~~~~~~~~
../../../common/temp/node_modules/.pnpm/vitest@2.0.5_@types+node@18.19.46_@vitest+browser@2.0.5/node_modules/vitest/dist/chunks/reporters.C_zwCd4j.d.ts:643:45 - error TS2503: Cannot find namespace 'vite'.

643     getModulesByFilepath(file: string): Set<vite.ModuleNode>;
                                                ~~~~
../../../common/temp/node_modules/.pnpm/vitest@2.0.5_@types+node@18.19.46_@vitest+browser@2.0.5/node_modules/vitest/dist/chunks/reporters.C_zwCd4j.d.ts:644:32 - error TS2503: Cannot find namespace 'vite'.

644     getModuleById(id: string): vite.ModuleNode | undefined;
                                   ~~~~
../../../common/temp/node_modules/.pnpm/vitest@2.0.5_@types+node@18.19.46_@vitest+browser@2.0.5/node_modules/vitest/dist/chunks/reporters.C_zwCd4j.d.ts:2675:16 - error TS2671: Cannot augment module 'vite' because it resolves to a non-module entity.

2675 declare module 'vite' {
                    ~~~~~~

[dev-tool] Errors occured. See the output above.

only remove "./test/**/*.ts" under include from tsconfig.json, this command could pass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    dev-toolIssues related to the Azure SDK for JS dev-toolquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions