Skip to content

When I create a new app in the current directory, the name in package.json is "." and not the name of the directory #157

Closed

Description

@matrv

Which project does this relate to?

Create Tanstack App

Describe the bug

When I type bun create tsrouter-app . in an empty directory, the name field in package.json of the generated app is set to ".". It should be set to the name of the directory instead.

Your Example Website or App

n/a

Steps to Reproduce the Bug or Issue

create an empty folder
run bun create tsrouter-app . in that folder
check the package.json

Expected behavior

I expect the name in package.json to be the name of the directory. This is how it works with most other project scaffolding clis (i tested sveltekit cli and create-next-app)

Screenshots or Videos

Image

Platform

Linux, bun

Additional context

No response

Activity

  1. jherr commented on Aug 24, 2025

    @jherr
    Collaborator

    bun create tsrouter-app . should just be an error because . is not a valid package name. The argument is a package name and not a path.

  2. reopened this on Aug 24, 2025
  3. egvr2002 commented on Nov 6, 2025

    @egvr2002
    Contributor

    So the fix would consist of throwing an error when the package name is .?

  4. jherr commented on Nov 6, 2025

    @jherr
    Collaborator

    The fix is to not allow invalid package names and "." is an invalid package name.

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