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

v12.1.2 breaks SSR compilation with multiple tsconfigs. #1037

Closed
quinnjr opened this issue Sep 16, 2021 · 8 comments · Fixed by #1041
Closed

v12.1.2 breaks SSR compilation with multiple tsconfigs. #1037

quinnjr opened this issue Sep 16, 2021 · 8 comments · Fixed by #1041

Comments

@quinnjr
Copy link

quinnjr commented Sep 16, 2021

Describe the Bug

On v12.1.2, my SSR application fails to build when running npm run dev:ssr with the error:
Called with multiple tsconfigs.

The error is not present in v12.1.1 and the application compiles as expected.

I've tested downgrading from v12.1.2 to v12.1.1 on two projects and can confirm the issue is present in both projects.

The error seems to be thrown from here

Minimal Reproduction

  1. Install v12.1.2 in a project using @angular-builders/custom-webpack:server to compile the server and @angular-builders/custom-webpack:browser for the browser application.
  2. Attempt to build the project and receive the error above.
  3. Downgrade to v12.1.1.
  4. Attempt to build the project (which should succeed)

Expected Behavior

The Angular application should compile both the frontend and server portions of the project correctly without errors.

Screenshots

Screenshot

Environment


Libs
- @angular/core version: ^12.2.6
- @angular-devkit/build-angular version: ^12.2.6
- @angular-builders/custom-webpack: 12.1.2

For Tooling issues:
- Node version: v14.15.4
- Platform: Linux

Others:
- PNPM version: 6.13.0
@just-jeb
Copy link
Owner

Hey @quinnjr, thanks for reporting this. Most certainly it was caused by this change, but in order to be able to figure out the problem I'm gonna need a minimal reproduction repo.
Care to share one? Thanks!

@exequiel09
Copy link
Contributor

exequiel09 commented Sep 29, 2021

I can confirm that this is happening. I was using @nguniversal/builders:ssr-dev-server (for serving SSR in development) alongside with @angular-builders/custom-webpack:server (to build the server bundles needed by @nguniversal/builders:ssr-dev-server) and it throws that error about multiple TSConfigs.

@exequiel09
Copy link
Contributor

exequiel09 commented Sep 29, 2021

@just-jeb here's the minimal reproduction repo for you: https://github.com/exequiel09/angular-builders/tree/multiple-tsconfigs-error/packages/custom-webpack/examples/full-cycle-app

Run the following command for the full-cycle-app example app.:

  1. Install deps - yarn
  2. Start the SSR dev server - yarn dev:ssr

Output when running:
Screen Shot 2021-09-29 at 5 57 44 PM

Notes: Dumping the value of lastTsConfig and tsConfig variables yields to:

DEBUG:: lastTsConfig = /Users/exequiel/Projects/repositories/angular-builders/packages/custom-webpack/examples/full-cycle-app/tsconfig.server.json
DEBUG:: tsConfig = /Users/exequiel/Projects/repositories/angular-builders/packages/custom-webpack/examples/full-cycle-app/tsconfig.app.json

Screen Shot 2021-09-29 at 6 00 18 PM

P.S. Make sure you're on the multiple-tsconfigs-error branch.

@just-jeb
Copy link
Owner

Should be fixed in 12.1.3-beta.1. Could you please verify?

@exequiel09
Copy link
Contributor

exequiel09 commented Sep 29, 2021 via email

@exequiel09
Copy link
Contributor

Hey @just-jeb! Works like a charm! 🥳

@just-jeb
Copy link
Owner

Cool then, I'm graduating it. Thanks!

@quinnjr
Copy link
Author

quinnjr commented Sep 30, 2021

Sorry for the late reply, but confirming that v12.1.3 also fixes the issue for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants