next.js
next.js copied to clipboard
`CI=true create-next-app --ts` sets up project using JS instead of TS
Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
Provide environment information
Operating System:
Platform: linux
Arch: x64
Version: #1 SMP PREEMPT_DYNAMIC Thu, 03 Nov 2022 18:01:58 +0000
Binaries:
Node: 14.21.0
npm: 8.19.2
Yarn: 1.22.19
pnpm: N/A
Relevant packages:
next: 13.0.2
eslint-config-next: 13.0.2
react: 18.2.0
react-dom: 18.2.0
What browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
Describe the Bug
Using npx create-next-app@latest --ts my-app does not work in continuous integration environments (i.e., if CI env var is set). The CLI simply ignores the --ts flag (https://github.com/vercel/next.js/blob/canary/packages/create-next-app/index.ts#L160).
Expected Behavior
Project should be bootstraped with TypeScript.
(It's okay to default to JavaScript to not break existing CI expecting JS, but if the command line argument --ts is given explicitly then create-next-app should install TypeScript packages and use TypeScript.)
Link to reproduction
CI=true npx create-next-app@latest --ts my-app
To Reproduce
- Run
CI=true npx create-next-app@latest --ts my-app - create-next-app should install TypeScript packages, but it doesn't.