Skip to content

Add support for typescript project using composite option #19725

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

Closed

Conversation

alxclark
Copy link

@alxclark alxclark commented Dec 2, 2020

What is this solving ?

Fixes #16364

Currently, when using the typescript composite option in a root tsconfig.json file, Next will rewrite the configuration file to add noEmit: true. This results in an error when running tsc which occurs when both composite and noEmit are present in a tsconfig.json. Here's a thread on the TS error in question microsoft/TypeScript#36917.

How are you solving it ?

Change noEmit for emitDeclarationOnly when we detect the composite option, making typescript emit only .d.ts files. This solution was proposed in both microsoft/TypeScript#36917 and microsoft/TypeScript#33809.

Notes

  • I've successfully tested the changes locally in a typescript project which uses composite to build for project reference.
  • The newly emitted .d.ts files might be problematic for projects that don't include an outDir (like most of the examples), since .d.ts files will be created next to each .ts or .tsx file. I personally redirect the output to a /build/ts directory and we could suggest something similar if the option is unset.

@ijjk ijjk added examples Issue was opened via the examples template. type: next labels Dec 2, 2020
@vercel vercel bot temporarily deployed to Preview December 2, 2020 03:15 Inactive
@ijjk
Copy link
Member

ijjk commented Dec 2, 2020

Failing test suites

Commit: 588699f

test/integration/app-tree/test/index.test.js

  • AppTree > production mode > should provide router context in AppTree on SSR
  • AppTree > production mode > should provide router context in AppTree on CSR
  • AppTree > production mode > should pass AppTree to NextPageContext
  • AppTree > serverless mode > should provide router context in AppTree on SSR
  • AppTree > serverless mode > should provide router context in AppTree on CSR
  • AppTree > serverless mode > should pass AppTree to NextPageContext
Expand output

● AppTree › production mode › should provide router context in AppTree on SSR

command failed with code 1

  138 |         code !== 0
  139 |       ) {
> 140 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  141 |       }
  142 | 
  143 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:140:23)

● AppTree › production mode › should provide router context in AppTree on CSR

command failed with code 1

  138 |         code !== 0
  139 |       ) {
> 140 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  141 |       }
  142 | 
  143 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:140:23)

● AppTree › production mode › should pass AppTree to NextPageContext

command failed with code 1

  138 |         code !== 0
  139 |       ) {
> 140 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  141 |       }
  142 | 
  143 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:140:23)

● AppTree › serverless mode › should provide router context in AppTree on SSR

command failed with code 1

  138 |         code !== 0
  139 |       ) {
> 140 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  141 |       }
  142 | 
  143 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:140:23)

● AppTree › serverless mode › should provide router context in AppTree on CSR

command failed with code 1

  138 |         code !== 0
  139 |       ) {
> 140 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  141 |       }
  142 | 
  143 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:140:23)

● AppTree › serverless mode › should pass AppTree to NextPageContext

command failed with code 1

  138 |         code !== 0
  139 |       ) {
> 140 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  141 |       }
  142 | 
  143 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:140:23)

test/integration/custom-server-types/test/index.test.js

  • Custom Server TypeScript > should build server.ts correctly
Expand output

● Custom Server TypeScript › should build server.ts correctly

exited with code: 1
tsconfig.json(12,5): error TS5069: Option 'emitDeclarationOnly' cannot be specified without specifying option 'declaration' or option 'composite'.

  272 |     instance.on('exit', (code) => {
  273 |       if (code) {
> 274 |         return reject(new Error('exited with code: ' + code + '\n' + output))
      |                       ^
  275 |       }
  276 |       resolve()
  277 |     })

  at ChildProcess.<anonymous> (lib/next-test-utils.js:274:23)

test/integration/handle-non-page-in-pages/test/index.test.js

  • Handle non-page in pages when target: serverless > Fails softly with descriptive error
Expand output

● Handle non-page in pages when target: serverless › Fails softly with descriptive error

expect(received).toMatch(expected)

Expected pattern: /found page without a React Component as default export in/
Received string:  "Failed to compile.·
Type error: Option 'emitDeclarationOnly' cannot be specified without specifying option 'declaration' or option 'composite'.·
"

  11 |     const { stderr } = await nextBuild(appDir, [], { stderr: true })
  12 | 
> 13 |     expect(stderr).toMatch(
     |                    ^
  14 |       /found page without a React Component as default export in/
  15 |     )
  16 |     expect(stderr).toMatch(/pages\/invalid/)

  at Object.<anonymous> (integration/handle-non-page-in-pages/test/index.test.js:13:20)

test/integration/typescript-only-remove-type-imports/test/index.test.js

  • TypeScript onlyRemoveTypeImports > production mode > should render a normal page correctly
  • TypeScript onlyRemoveTypeImports > production mode > should render a page with type import correctly
Expand output

● TypeScript onlyRemoveTypeImports › production mode › should render a normal page correctly

command failed with code 1

  138 |         code !== 0
  139 |       ) {
> 140 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  141 |       }
  142 | 
  143 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:140:23)

● TypeScript onlyRemoveTypeImports › production mode › should render a page with type import correctly

command failed with code 1

  138 |         code !== 0
  139 |       ) {
> 140 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  141 |       }
  142 | 
  143 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:140:23)

● Test suite failed to run

TypeError: Cannot read property 'pid' of undefined

  282 | export async function killApp(instance) {
  283 |   await new Promise((resolve, reject) => {
> 284 |     treeKill(instance.pid, (err) => {
      |                       ^
  285 |       if (err) {
  286 |         if (
  287 |           process.platform === 'win32' &&

  at lib/next-test-utils.js:284:23
  at killApp (lib/next-test-utils.js:283:9)
  at integration/typescript-only-remove-type-imports/test/index.test.js:40:20

test/integration/tsconfig-verifier/test/index.test.js

  • tsconfig.json verifier > Creates a default tsconfig.json when one is missing
  • tsconfig.json verifier > Works with an empty tsconfig.json (docs)
  • tsconfig.json verifier > Updates an existing tsconfig.json without losing comments
  • tsconfig.json verifier > allows you to set commonjs module mode
  • tsconfig.json verifier > allows you to set es2020 module mode
Expand output

● tsconfig.json verifier › Creates a default tsconfig.json when one is missing

command failed with code 1

  138 |         code !== 0
  139 |       ) {
> 140 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  141 |       }
  142 | 
  143 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:140:23)

● tsconfig.json verifier › Works with an empty tsconfig.json (docs)

command failed with code 1

  138 |         code !== 0
  139 |       ) {
> 140 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  141 |       }
  142 | 
  143 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:140:23)

● tsconfig.json verifier › Updates an existing tsconfig.json without losing comments

command failed with code 1

  138 |         code !== 0
  139 |       ) {
> 140 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  141 |       }
  142 | 
  143 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:140:23)

● tsconfig.json verifier › allows you to set commonjs module mode

command failed with code 1

  138 |         code !== 0
  139 |       ) {
> 140 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  141 |       }
  142 | 
  143 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:140:23)

● tsconfig.json verifier › allows you to set es2020 module mode

command failed with code 1

  138 |         code !== 0
  139 |       ) {
> 140 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  141 |       }
  142 | 
  143 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:140:23)

@ijjk
Copy link
Member

ijjk commented Dec 2, 2020

Stats from current PR

Default Server Mode
General Overall increase ⚠️
vercel/next.js canary alxclark/next.js alx/typescript-remove-noEmit Change
buildDuration 9.8s 9.7s -75ms
nodeModulesSize 85 MB 85 MB ⚠️ +95 B
Page Load Tests Overall increase ✓
vercel/next.js canary alxclark/next.js alx/typescript-remove-noEmit Change
/ failed reqs 0 0
/ total time (seconds) 1.997 1.974 -0.02
/ avg req/sec 1251.66 1266.28 +14.62
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.22 1.227 ⚠️ +0.01
/error-in-render avg req/sec 2049.31 2038.28 ⚠️ -11.03
Client Bundles (main, webpack, commons)
vercel/next.js canary alxclark/next.js alx/typescript-remove-noEmit Change
677f882d2ed8..8b6e.js gzip 12.8 kB 12.8 kB
framework.HASH.js gzip 39 kB 39 kB
main-3c9ff84..1d7c.js gzip 6.56 kB 6.56 kB
webpack-e067..f178.js gzip 751 B 751 B
Overall change 59 kB 59 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary alxclark/next.js alx/typescript-remove-noEmit Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary alxclark/next.js alx/typescript-remove-noEmit Change
_app-7231d4b..5856.js gzip 1.28 kB 1.28 kB
_error-fca3d..2eb1.js gzip 3.44 kB 3.44 kB
hooks-d4591d..e7c2.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-db223d9..dbd7.js gzip 1.61 kB 1.61 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 8.01 kB 8.01 kB
Client Build Manifests
vercel/next.js canary alxclark/next.js alx/typescript-remove-noEmit Change
_buildManifest.js gzip 321 B 321 B
Overall change 321 B 321 B
Rendered Page Sizes
vercel/next.js canary alxclark/next.js alx/typescript-remove-noEmit Change
index.html gzip 614 B 614 B
link.html gzip 620 B 620 B
withRouter.html gzip 608 B 608 B
Overall change 1.84 kB 1.84 kB

Serverless Mode
General Overall increase ⚠️
vercel/next.js canary alxclark/next.js alx/typescript-remove-noEmit Change
buildDuration 11.6s 12s ⚠️ +454ms
nodeModulesSize 85 MB 85 MB ⚠️ +95 B
Client Bundles (main, webpack, commons)
vercel/next.js canary alxclark/next.js alx/typescript-remove-noEmit Change
677f882d2ed8..8b6e.js gzip 12.8 kB 12.8 kB
framework.HASH.js gzip 39 kB 39 kB
main-3c9ff84..1d7c.js gzip 6.56 kB 6.56 kB
webpack-e067..f178.js gzip 751 B 751 B
Overall change 59 kB 59 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary alxclark/next.js alx/typescript-remove-noEmit Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary alxclark/next.js alx/typescript-remove-noEmit Change
_app-7231d4b..5856.js gzip 1.28 kB 1.28 kB
_error-fca3d..2eb1.js gzip 3.44 kB 3.44 kB
hooks-d4591d..e7c2.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-db223d9..dbd7.js gzip 1.61 kB 1.61 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 8.01 kB 8.01 kB
Client Build Manifests
vercel/next.js canary alxclark/next.js alx/typescript-remove-noEmit Change
_buildManifest.js gzip 321 B 321 B
Overall change 321 B 321 B
Serverless bundles
vercel/next.js canary alxclark/next.js alx/typescript-remove-noEmit Change
_error.js 997 kB 997 kB
404.html 2.67 kB 2.67 kB
hooks.html 1.92 kB 1.92 kB
index.js 998 kB 998 kB
link.js 1.05 MB 1.05 MB
routerDirect.js 1.04 MB 1.04 MB
withRouter.js 1.04 MB 1.04 MB
Overall change 5.14 MB 5.14 MB
Commit: 588699f

@alxclark alxclark force-pushed the alx/typescript-remove-noEmit branch from 588699f to e4e1dc1 Compare December 2, 2020 04:08
@vercel vercel bot temporarily deployed to Preview December 2, 2020 04:08 Inactive
@alxclark alxclark force-pushed the alx/typescript-remove-noEmit branch from e4e1dc1 to 3522dea Compare December 2, 2020 04:15
@vercel vercel bot temporarily deployed to Preview December 2, 2020 04:15 Inactive
@ijjk
Copy link
Member

ijjk commented Dec 2, 2020

Stats from current PR

Default Server Mode (Decrease detected ✓)
General Overall increase ⚠️
vercel/next.js canary alxclark/next.js alx/typescript-remove-noEmit Change
buildDuration 10s 9.8s -148ms
nodeModulesSize 85 MB 85 MB ⚠️ +720 B
Page Load Tests Overall decrease ⚠️
vercel/next.js canary alxclark/next.js alx/typescript-remove-noEmit Change
/ failed reqs 0 0
/ total time (seconds) 2.015 2.064 ⚠️ +0.05
/ avg req/sec 1240.51 1211.26 ⚠️ -29.25
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.242 1.268 ⚠️ +0.03
/error-in-render avg req/sec 2013.42 1971.49 ⚠️ -41.93
Client Bundles (main, webpack, commons)
vercel/next.js canary alxclark/next.js alx/typescript-remove-noEmit Change
677f882d2ed8..8b6e.js gzip 12.8 kB 12.8 kB
framework.HASH.js gzip 39 kB 39 kB
main-3c9ff84..1d7c.js gzip 6.56 kB 6.56 kB
webpack-e067..f178.js gzip 751 B 751 B
Overall change 59 kB 59 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary alxclark/next.js alx/typescript-remove-noEmit Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary alxclark/next.js alx/typescript-remove-noEmit Change
_app-7231d4b..5856.js gzip 1.28 kB 1.28 kB
_error-fca3d..2eb1.js gzip 3.44 kB 3.44 kB
hooks-d4591d..e7c2.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-db223d9..dbd7.js gzip 1.61 kB 1.61 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 8.01 kB 8.01 kB
Client Build Manifests
vercel/next.js canary alxclark/next.js alx/typescript-remove-noEmit Change
_buildManifest.js gzip 321 B 321 B
Overall change 321 B 321 B
Rendered Page Sizes
vercel/next.js canary alxclark/next.js alx/typescript-remove-noEmit Change
index.html gzip 614 B 614 B
link.html gzip 620 B 620 B
withRouter.html gzip 608 B 608 B
Overall change 1.84 kB 1.84 kB

Serverless Mode
General Overall increase ⚠️
vercel/next.js canary alxclark/next.js alx/typescript-remove-noEmit Change
buildDuration 12s 11.7s -241ms
nodeModulesSize 85 MB 85 MB ⚠️ +720 B
Client Bundles (main, webpack, commons)
vercel/next.js canary alxclark/next.js alx/typescript-remove-noEmit Change
677f882d2ed8..8b6e.js gzip 12.8 kB 12.8 kB
framework.HASH.js gzip 39 kB 39 kB
main-3c9ff84..1d7c.js gzip 6.56 kB 6.56 kB
webpack-e067..f178.js gzip 751 B 751 B
Overall change 59 kB 59 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary alxclark/next.js alx/typescript-remove-noEmit Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary alxclark/next.js alx/typescript-remove-noEmit Change
_app-7231d4b..5856.js gzip 1.28 kB 1.28 kB
_error-fca3d..2eb1.js gzip 3.44 kB 3.44 kB
hooks-d4591d..e7c2.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-db223d9..dbd7.js gzip 1.61 kB 1.61 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 8.01 kB 8.01 kB
Client Build Manifests
vercel/next.js canary alxclark/next.js alx/typescript-remove-noEmit Change
_buildManifest.js gzip 321 B 321 B
Overall change 321 B 321 B
Serverless bundles
vercel/next.js canary alxclark/next.js alx/typescript-remove-noEmit Change
_error.js 997 kB 997 kB
404.html 2.67 kB 2.67 kB
hooks.html 1.92 kB 1.92 kB
index.js 998 kB 998 kB
link.js 1.05 MB 1.05 MB
routerDirect.js 1.04 MB 1.04 MB
withRouter.js 1.04 MB 1.04 MB
Overall change 5.14 MB 5.14 MB
Commit: e4e1dc1

@ijjk
Copy link
Member

ijjk commented Dec 2, 2020

Stats from current PR

Default Server Mode (Decrease detected ✓)
General Overall increase ⚠️
vercel/next.js canary alxclark/next.js alx/typescript-remove-noEmit Change
buildDuration 9.9s 9.9s ⚠️ +38ms
nodeModulesSize 85 MB 85 MB ⚠️ +720 B
Page Load Tests Overall decrease ⚠️
vercel/next.js canary alxclark/next.js alx/typescript-remove-noEmit Change
/ failed reqs 0 0
/ total time (seconds) 1.955 1.999 ⚠️ +0.04
/ avg req/sec 1279.05 1250.65 ⚠️ -28.4
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.198 1.221 ⚠️ +0.02
/error-in-render avg req/sec 2086.51 2047.13 ⚠️ -39.38
Client Bundles (main, webpack, commons)
vercel/next.js canary alxclark/next.js alx/typescript-remove-noEmit Change
677f882d2ed8..8b6e.js gzip 12.8 kB 12.8 kB
framework.HASH.js gzip 39 kB 39 kB
main-3c9ff84..1d7c.js gzip 6.56 kB 6.56 kB
webpack-e067..f178.js gzip 751 B 751 B
Overall change 59 kB 59 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary alxclark/next.js alx/typescript-remove-noEmit Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary alxclark/next.js alx/typescript-remove-noEmit Change
_app-7231d4b..5856.js gzip 1.28 kB 1.28 kB
_error-fca3d..2eb1.js gzip 3.44 kB 3.44 kB
hooks-d4591d..e7c2.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-db223d9..dbd7.js gzip 1.61 kB 1.61 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 8.01 kB 8.01 kB
Client Build Manifests
vercel/next.js canary alxclark/next.js alx/typescript-remove-noEmit Change
_buildManifest.js gzip 321 B 321 B
Overall change 321 B 321 B
Rendered Page Sizes
vercel/next.js canary alxclark/next.js alx/typescript-remove-noEmit Change
index.html gzip 614 B 614 B
link.html gzip 620 B 620 B
withRouter.html gzip 608 B 608 B
Overall change 1.84 kB 1.84 kB

Serverless Mode
General Overall increase ⚠️
vercel/next.js canary alxclark/next.js alx/typescript-remove-noEmit Change
buildDuration 11.7s 11.9s ⚠️ +180ms
nodeModulesSize 85 MB 85 MB ⚠️ +720 B
Client Bundles (main, webpack, commons)
vercel/next.js canary alxclark/next.js alx/typescript-remove-noEmit Change
677f882d2ed8..8b6e.js gzip 12.8 kB 12.8 kB
framework.HASH.js gzip 39 kB 39 kB
main-3c9ff84..1d7c.js gzip 6.56 kB 6.56 kB
webpack-e067..f178.js gzip 751 B 751 B
Overall change 59 kB 59 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary alxclark/next.js alx/typescript-remove-noEmit Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary alxclark/next.js alx/typescript-remove-noEmit Change
_app-7231d4b..5856.js gzip 1.28 kB 1.28 kB
_error-fca3d..2eb1.js gzip 3.44 kB 3.44 kB
hooks-d4591d..e7c2.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-db223d9..dbd7.js gzip 1.61 kB 1.61 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 8.01 kB 8.01 kB
Client Build Manifests
vercel/next.js canary alxclark/next.js alx/typescript-remove-noEmit Change
_buildManifest.js gzip 321 B 321 B
Overall change 321 B 321 B
Serverless bundles
vercel/next.js canary alxclark/next.js alx/typescript-remove-noEmit Change
_error.js 997 kB 997 kB
404.html 2.67 kB 2.67 kB
hooks.html 1.92 kB 1.92 kB
index.js 998 kB 998 kB
link.js 1.05 MB 1.05 MB
routerDirect.js 1.04 MB 1.04 MB
withRouter.js 1.04 MB 1.04 MB
Overall change 5.14 MB 5.14 MB
Commit: 3522dea

@ijjk
Copy link
Member

ijjk commented Dec 2, 2020

Failing test suites

Commit: e4e1dc1

test/integration/tsconfig-verifier/test/index.test.js

  • tsconfig.json verifier > Creates a default tsconfig.json when one is missing
  • tsconfig.json verifier > Works with an empty tsconfig.json (docs)
  • tsconfig.json verifier > Updates an existing tsconfig.json without losing comments
  • tsconfig.json verifier > allows you to set commonjs module mode
  • tsconfig.json verifier > allows you to set es2020 module mode
  • tsconfig.json verifier > allows you to build for project references
Expand output

● tsconfig.json verifier › Creates a default tsconfig.json when one is missing

command failed with code 1

  138 |         code !== 0
  139 |       ) {
> 140 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  141 |       }
  142 | 
  143 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:140:23)

● tsconfig.json verifier › Works with an empty tsconfig.json (docs)

command failed with code 1

  138 |         code !== 0
  139 |       ) {
> 140 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  141 |       }
  142 | 
  143 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:140:23)

● tsconfig.json verifier › Updates an existing tsconfig.json without losing comments

command failed with code 1

  138 |         code !== 0
  139 |       ) {
> 140 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  141 |       }
  142 | 
  143 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:140:23)

● tsconfig.json verifier › allows you to set commonjs module mode

command failed with code 1

  138 |         code !== 0
  139 |       ) {
> 140 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  141 |       }
  142 | 
  143 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:140:23)

● tsconfig.json verifier › allows you to set es2020 module mode

command failed with code 1

  138 |         code !== 0
  139 |       ) {
> 140 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  141 |       }
  142 | 
  143 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:140:23)

● tsconfig.json verifier › allows you to build for project references

command failed with code 1

  138 |         code !== 0
  139 |       ) {
> 140 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  141 |       }
  142 | 
  143 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:140:23)

@ijjk
Copy link
Member

ijjk commented Dec 2, 2020

Failing test suites

Commit: 3522dea

test/integration/tsconfig-verifier/test/index.test.js

  • tsconfig.json verifier > Creates a default tsconfig.json when one is missing
  • tsconfig.json verifier > Works with an empty tsconfig.json (docs)
  • tsconfig.json verifier > Updates an existing tsconfig.json without losing comments
  • tsconfig.json verifier > allows you to set commonjs module mode
  • tsconfig.json verifier > allows you to set es2020 module mode
  • tsconfig.json verifier > allows you to build for project references
Expand output

● tsconfig.json verifier › Creates a default tsconfig.json when one is missing

command failed with code 1

  138 |         code !== 0
  139 |       ) {
> 140 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  141 |       }
  142 | 
  143 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:140:23)

● tsconfig.json verifier › Works with an empty tsconfig.json (docs)

command failed with code 1

  138 |         code !== 0
  139 |       ) {
> 140 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  141 |       }
  142 | 
  143 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:140:23)

● tsconfig.json verifier › Updates an existing tsconfig.json without losing comments

command failed with code 1

  138 |         code !== 0
  139 |       ) {
> 140 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  141 |       }
  142 | 
  143 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:140:23)

● tsconfig.json verifier › allows you to set commonjs module mode

command failed with code 1

  138 |         code !== 0
  139 |       ) {
> 140 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  141 |       }
  142 | 
  143 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:140:23)

● tsconfig.json verifier › allows you to set es2020 module mode

command failed with code 1

  138 |         code !== 0
  139 |       ) {
> 140 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  141 |       }
  142 | 
  143 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:140:23)

● tsconfig.json verifier › allows you to build for project references

command failed with code 1

  138 |         code !== 0
  139 |       ) {
> 140 |         return reject(new Error(`command failed with code ${code}`))
      |                       ^
  141 |       }
  142 | 
  143 |       resolve({

  at ChildProcess.<anonymous> (lib/next-test-utils.js:140:23)

@alxclark alxclark closed this Apr 13, 2021
@vercel vercel locked as resolved and limited conversation to collaborators Jan 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
examples Issue was opened via the examples template. type: next
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TypeScript: Option 'noEmit' cannot be specified with option 'composite'
2 participants