create-t3-app
create-t3-app copied to clipboard
bug: using dot name doesn't automatically fill the dir name in .env file
Provide environment information
System: OS: Windows 11 10.0.22631 CPU: (22) x64 Intel(R) Core(TM) Ultra 7 155H Memory: 13.90 GB / 31.37 GB Binaries: Node: 20.12.1 - C:\Program Files\nodejs\node.EXE npm: 10.8.1 - C:\Program Files\nodejs\npm.CMD
initVersion: 7.34.0
Describe the bug
When i am using dot name to start a new project, the Drizzle database DATABASE_URL is "postgresql://postgres:password@localhost:5432/."
in .env file.
However, i'd expect it to be "postgresql://postgres:password@localhost:5432/<dirname>"
.
Reproduction repo
https://stackblitz.com/edit/stackblitz-starters-wkfyjt?file=.env
To reproduce
~/projects/stackblitz-starters-wkfyjt
❯ npx create-t3-app@latest
Need to install the following packages:
[email protected]
Ok to proceed? (y) y
___ ___ ___ __ _____ ___ _____ ____ __ ___ ___
/ __| _ \ __| / \_ _| __| |_ _|__ / / \ | _ \ _ \
| (__| / _| / /\ \| | | _| | | |_ \ / /\ \| _/ _/
\___|_|_\___|_/‾‾\_\_| |___| |_| |___/ /_/‾‾\_\_| |_|
│
◇ What will your project be called?
│ .
│
◇ Will you be using TypeScript or JavaScript?
│ TypeScript
│
◇ Will you be using Tailwind CSS for styling?
│ Yes
│
◇ Would you like to use tRPC?
│ No
│
◇ What authentication provider would you like to use?
│ None
│
◇ What database ORM would you like to use?
│ Drizzle
│
◇ Would you like to use Next.js App Router?
│ Yes
│
◇ What database provider would you like to use?
│ PostgreSQL
│
◇ Should we initialize a Git repository and stage the changes?
│ Yes
│
◇ Should we run 'npm install' for you?
│ Yes
│
◇ What import alias would you like to use?
│ ~/
Using: npm
Scaffolding in: /home/projects/stackblitz-starters-wkfyjt...
│
◇ Warning: . already exists and isn't empty. How would you like to proceed?
│ Clear the directory and continue installation
│
◇ Are you sure you want to clear the directory?
│ Yes
ℹ Emptying . and creating t3 app..
✔ App scaffolded successfully!
Adding boilerplate...
✔ Successfully setup boilerplate for drizzle
✔ Successfully setup boilerplate for tailwind
✔ Successfully setup boilerplate for dbContainer
✔ Successfully setup boilerplate for envVariables
✔ Successfully setup boilerplate for eslint
Installing dependencies...
npm WARN deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm WARN deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
npm WARN deprecated @humanwhocodes/[email protected]: Use @eslint/object-schema instead
npm WARN deprecated @humanwhocodes/[email protected]: Use @eslint/config-array instead
npm WARN deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm WARN deprecated [email protected]: Glob versions prior to v9 are no longer supported
✔ Successfully installed dependencies!
Initializing Git...
jsh: command not found: git
Git is not installed. Skipping Git initialization.
Next steps:
Start up a database, if needed using './start-database.sh'
npm run db:push
npm run dev
git init
git commit -m "initial commit"
Additional information
for "postgresql://postgres:password@localhost:5432/<dirname>"
, we could look into how dirname is populated in package.json "name": "<dirname>"