V0 just isn't able to use alias and index together

Hi,

I am trying to get v0 to use alias in tsconfig and it just won’t work. It does work locally if I download the project and run it, but in the online IDE, it reports not being able to find the files.

If I just start from the alias and write the whole path entirely, it does work but that is really an ugly way to do that. It does output valid code but won’t be able to actually run it.

in tsconfig paths:

      "@design-system": [
        "./design-system"
      ]

under the design-system folder is an index.ts, that export a component from another file in this format:
export * from "./atoms/button"

and the button of course has its own index.ts

Pretty standard setup to be honest. works flawlessly locally. The issue I think is from the way v0 run things (that’s my guess)

The error from nextjs says: The file "./atoms/button" cannot be found. Make sure the file exists.

Not sure if there is really a solutoin and/or if that’s known behavior.

Did you know about these other v0 resources? A human should be here soon to help, but the answer may already be available even faster in one of these other posts.

This guide is a great place to start.

And these recordings can give you a look at v0 features and strategies in action: Topics tagged v0