Skip to content

tanstack add path resolve error on windows #329

Description

@MarvinXu

Which project does this relate to?

Create Tanstack App

Describe the bug

PS C:\Users\marv\workspace\fenbi-tanstack> tanstack add shadcn
┌  Adding shadcn to the project...
node:internal/fs/promises:642
  return new FileHandle(await PromisePrototypeThen(
                        ^

Error: ENOENT: no such file or directory, open 'C:\Users\marv\workspace\fenbi-tanstack\Users\marv\workspace\fenbi-tanstack\package.json'
    at async open (node:internal/fs/promises:642:25)
    at async readFile (node:internal/fs/promises:1279:14)
    at async Object.readFile (file:///C:/Users/marv/AppData/Local/pnpm/global/5/.pnpm/@tanstack+create@0.49.3_tslib@2.8.1/node_modules/@tanstack/create/dist/environment.js:61:21)
    at async writeFiles (file:///C:/Users/marv/AppData/Local/pnpm/global/5/.pnpm/@tanstack+create@0.49.3_tslib@2.8.1/node_modules/@tanstack/create/dist/add-to-app.js:83:44)
    at async addToApp (file:///C:/Users/marv/AppData/Local/pnpm/global/5/.pnpm/@tanstack+create@0.49.3_tslib@2.8.1/node_modules/@tanstack/create/dist/add-to-app.js:138:5)
    at async Command.<anonymous> (file:///C:/Users/marv/AppData/Local/pnpm/global/5/.pnpm/@tanstack+cli@0.48.7_@babel_0213e0a28e2c3897a033eaf3ba9b4a1c/node_modules/@tanstack/cli/dist/cli.js:456:13) {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'open',
  path: 'C:\\Users\\marv\\workspace\\fenbi-tanstack\\Users\\marv\\workspace\\fenbi-tanstack\\package.json'    
}

Node.js v24.12.0

Your Example Website or App

.

Steps to Reproduce the Bug or Issue

  1. init project with tanstack create .
  2. tanstack add shadcn

Expected behavior

no error

Screenshots or Videos

No response

Platform

  • OS: [e.g. macOS, Windows, Linux]
  • Browser: [e.g. Chrome, Safari, Firefox]
  • Version: [e.g. 91.1]

Additional context

No response

Activity

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

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