Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix react-dom type error in CNA typescript template #34623

Merged
merged 9 commits into from Feb 24, 2022
Merged
7 changes: 6 additions & 1 deletion packages/create-next-app/create-app.ts
Expand Up @@ -234,7 +234,12 @@ export async function createApp({
* TypeScript projects will have type definitions and other devDependencies.
*/
if (typescript) {
devDependencies.push('typescript', '@types/react', '@types/node')
devDependencies.push(
'typescript',
'@types/react',
'@types/node',
'@types/react-dom'
)
}
/**
* Install package.json dependencies if they exist.
Expand Down
1 change: 1 addition & 0 deletions test/integration/create-next-app/index.test.js
Expand Up @@ -143,6 +143,7 @@ describe('create next app', () => {
expect(Object.keys(pkgJSON.devDependencies)).toEqual([
'@types/node',
'@types/react',
'@types/react-dom',
'eslint',
'eslint-config-next',
'typescript',
Expand Down