Bug
For the two *+tailwind+auth stacks, the Express server setup (which runs npm init -y and installs dependencies) executes twice:
- Once inside the stack setup itself:
mernSetup() calls serverAuthSetup() when config.stack === "mern+tailwind+auth" (utils/installer.js:321-322)
mevnTailwindAuthSetup() calls serverAuthSetup() at the end (utils/installer.js:398)
- Then again from
utils/project.js:
mern+tailwind+auth path: project.js:204 → serverAuthSetup(...) after mernTailwindSetup
mevn+tailwind+auth path: project.js:210 → serverAuthSetup(...) after copyTemplates
Reproduction
celtrix create → stack mern+tailwind+auth
- Observe
npm init -y + dependency install output twice for the server/ directory
Impact
- Redundant
npm init -y + full dependency install → noticeably slower scaffolding.
- Second
npm init -y rewrites server/package.json (dependencies are dropped, then reinstalled) — wasteful and risks losing the deps between the two passes.
Suggested fix
Call serverAuthSetup in exactly one place per stack — either inside the *Setup helper or in project.js, not both. Prefer keeping it in project.js so the auth-server setup is uniform across stacks.
Environment
Bug
For the two
*+tailwind+authstacks, the Express server setup (which runsnpm init -yand installs dependencies) executes twice:mernSetup()callsserverAuthSetup()whenconfig.stack === "mern+tailwind+auth"(utils/installer.js:321-322)mevnTailwindAuthSetup()callsserverAuthSetup()at the end (utils/installer.js:398)utils/project.js:mern+tailwind+authpath:project.js:204→serverAuthSetup(...)aftermernTailwindSetupmevn+tailwind+authpath:project.js:210→serverAuthSetup(...)aftercopyTemplatesReproduction
celtrix create→ stackmern+tailwind+authnpm init -y+ dependency install output twice for theserver/directoryImpact
npm init -y+ full dependency install → noticeably slower scaffolding.npm init -yrewritesserver/package.json(dependencies are dropped, then reinstalled) — wasteful and risks losing the deps between the two passes.Suggested fix
Call
serverAuthSetupin exactly one place per stack — either inside the*Setuphelper or inproject.js, not both. Prefer keeping it inproject.jsso the auth-server setup is uniform across stacks.Environment
celtrixv3.0.1