Skip to content

Fails to build out of the box #122

Open
@regunakyle

Description

@regunakyle

Which project does this relate to?

Create Tanstack App

Describe the bug

Run npx create-tsrouter-app@latest to create a app (I did not pick any extra options). Then run npm run build and it will fail because of Typescript errors:

vite.config.ts:4:25 - error TS2307: Cannot find module 'node:path' or its corresponding type declarations.

4 import { resolve } from 'node:path'
                          ~~~~~~~~~~~

vite.config.ts:9:3 - error TS2769: No overload matches this call.
  The last overload gave the following error.
    Object literal may only specify known properties, and 'test' does not exist in type 'UserConfigExport'.

9   test: {
    ~~~~

  node_modules/vite/dist/node/index.d.ts:3642:18
    3642 declare function defineConfig(config: UserConfigExport): UserConfigExport;
                          ~~~~~~~~~~~~
    The last overload is declared here.

vite.config.ts:15:20 - error TS2304: Cannot find name '__dirname'.

15       '@': resolve(__dirname, './src'),
                      ~~~~~~~~~


Found 3 errors in the same file, starting at: vite.config.ts:4

Your Example Website or App

None

Steps to Reproduce the Bug or Issue

  1. Run npx create-tsrouter-app@latest
  2. Run npm run build

Expected behavior

Builds successfully

Screenshots or Videos

No response

Platform

  • OS: Linux
  • Version: 0.16.3

Additional context

No response

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