Skip to content

"All projects should have unique names" #3939

Closed Answered by matthew-dean
matthew-dean asked this question in Q&A
Discussion options

You must be logged in to vote

I got this working! The Vitest workspace documentation is very opaque, and this error has nothing to do with the problem.

In my case:

  1. Each package MUST have a vitest.config.ts, or at the VERY LEAST,
  2. Each package that the workspace DEFINES must have a vitest.config.ts.

The way I get this working was to have a Vitest Workspace that looks like:

import { defineWorkspace } from 'vitest/config'
export default defineWorkspace([
  'packages/*/vitest.config.ts'
])

Essentially, Vitest will complain about names needing to be unique because it... I dunno, but whatever the Vitest documentation says is false. It won't use the package (folder) names and will fail.

Replies: 4 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@seawatts
Comment options

@sheremet-va
Comment options

@Shakeskeyboarde
Comment options

Answer selected by matthew-dean
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants