question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Warnings after upgrade to Angular 10 / TS 3.9.5

See original GitHub issue

Current Behavior

After upgrading to Angular 10 and TypeScript 3.9.5, I get the following warnings when creating a production build of my app:

sebastien@developassion:~/wks/didowi$ npx nx run web:build --prod

> ng run web:build:production 
Webpack configuration building with mode:  development
Generating ES5 bundles for differential loading...
ES5 bundle generation complete.

chunk {polyfills} polyfills-es2015.dd834007d8469cb6f408.js (polyfills) 44.8 kB [initial] [rendered]
chunk {polyfills-es5} polyfills-es5.57f4d7c5c0aa4a0f3147.js (polyfills-es5) 403 kB [initial] [rendered]
chunk {2} 2-es2015.c995a104bfea5da7a6dc.js () 1.58 MB  [rendered]
chunk {2} 2-es5.c995a104bfea5da7a6dc.js () 1.56 MB  [rendered]
chunk {0} 0-es2015.b7942f9cc5313dc6de6c.js () 39.8 kB  [rendered]
chunk {0} 0-es5.b7942f9cc5313dc6de6c.js () 38.9 kB  [rendered]
chunk {main} main-es2015.06b506227aef226eebac.js (main) 3.92 MB [initial] [rendered]
chunk {main} main-es5.06b506227aef226eebac.js (main) 3.98 MB [initial] [rendered]
chunk {4} 4-es2015.f0f09c39ae93d164922f.js () 25.3 kB  [rendered]
chunk {4} 4-es5.f0f09c39ae93d164922f.js () 24.4 kB  [rendered]
chunk {3} 3-es2015.20cdb345e04072712846.js () 101 kB  [rendered]
chunk {3} 3-es5.20cdb345e04072712846.js () 104 kB  [rendered]
chunk {1} 1-es2015.a8a1ccef369669bc7ab2.js () 224 kB  [rendered]
chunk {1} 1-es5.a8a1ccef369669bc7ab2.js () 210 kB  [rendered]
chunk {5} 5-es2015.dfc3b1861e30e90e9111.js () 7.44 kB  [rendered]
chunk {5} 5-es5.dfc3b1861e30e90e9111.js () 7.9 kB  [rendered]
chunk {7} 7-es2015.7fdb3bef35fb846bac16.js () 7.86 kB  [rendered]
chunk {7} 7-es5.7fdb3bef35fb846bac16.js () 8.32 kB  [rendered]
chunk {6} 6-es2015.dd07b845eb827a7fa41d.js () 7.6 kB  [rendered]
chunk {6} 6-es5.dd07b845eb827a7fa41d.js () 8.06 kB  [rendered]
chunk {runtime} runtime-es2015.c01b1b606ca4a90d899c.js (runtime) 2.54 kB [entry] [rendered]
chunk {runtime} runtime-es5.c01b1b606ca4a90d899c.js (runtime) 2.42 kB [entry] [rendered]
chunk {styles} styles.0f603221194aa86e2154.css (styles) 3.72 MB [initial] [rendered]
Date: 2020-06-25T09:46:27.839Z - Hash: da7ed542e8bc9c242371 - Time: 49429ms

WARNING in /home/sebastien/wks/didowi/apps/web/src/main.ngtypecheck.ts is part of the TypeScript compilation but it's unused.
Add only entry points to the 'files' or 'include' properties in your tsconfig.

WARNING in /home/sebastien/wks/didowi/apps/web/src/app/index.ngtypecheck.ts is part of the TypeScript compilation but it's unused.
Add only entry points to the 'files' or 'include' properties in your tsconfig.

WARNING in /home/sebastien/wks/didowi/apps/web/src/app/app.module.ngtypecheck.ts is part of the TypeScript compilation but it's unused.
Add only entry points to the 'files' or 'include' properties in your tsconfig.

WARNING in /home/sebastien/wks/didowi/libs/common-gate-api/src/index.ngtypecheck.ts is part of the TypeScript compilation but it's unused.
Add only entry points to the 'files' or 'include' properties in your tsconfig.

WARNING in /home/sebastien/wks/didowi/libs/common-gate-api/src/lib/common-gate-api.ngtypecheck.ts is part of the TypeScript compilation but it's unused.
Add only entry points to the 'files' or 'include' properties in your tsconfig.

WARNING in /home/sebastien/wks/didowi/libs/common-gate-api/src/lib/constants.ngtypecheck.ts is part of the TypeScript compilation but it's unused.
Add only entry points to the 'files' or 'include' properties in your tsconfig.

WARNING in /home/sebastien/wks/didowi/libs/common-gate-api/src/lib/authorization/meetings/meeting-authorizations-v1.intf.ngtypecheck.ts is part of the TypeScript compilation but it's unused.
Add only entry points to the 'files' or 'include' properties in your tsconfig.

WARNING in /home/sebastien/wks/didowi/libs/common-gate-api/src/lib/authorization/meetings/user-role-in-meeting-v1.intf.ngtypecheck.ts is part of the TypeScript compilation but it's unused.
Add only entry points to the 'files' or 'include' properties in your tsconfig.

... (tons more like that)

In the tsconfig.json files, I have the following:

{
  "extends": "../../tsconfig.json",
  "compilerOptions": {
    "types": ["node", "jest"]
  },
  "include": ["**/*.ts"]
}

I’m not sure if I’ve caused this or if it is the default configuration of NX for apps/libs.

Expected Behavior

No Webpack / TS warnings for *.ngtypecheck.ts files during production builds

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

33reactions
juristrcommented, Jun 25, 2020

Hey all. We suggest to wait with the upgrade until we release Nx v10. We’re already working on it but need some time to make sure to implement the necessary migrations and test it properly.

Once that’s released, you can just upgrade Nx which will then make sure to move your Nx workspace + Angular over to v10 😃

I keep this issue open s.t. we can test it against our v10 release.

15reactions
juristrcommented, Jun 29, 2020

🙏 patience is needed, we’re polishing the last rough edges 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular warning stack after the update from version 9 to 10 ...
I got too many warnings like mentioned below. WARNING in __local_path__file_name..ngtypecheck.ts is part of the TypeScript compilation but it's ...
Read more >
Angular Update Guide
Guide to update your Angular application v5.0 -> v13.0 for medium applications. Before you update.
Read more >
How To Update Angular CLI To Latest Version
To update Angular CLI version in your local projects use the following commands. Navigate to your local Angular project folder and execute the ......
Read more >
Documentation - TypeScript 3.9
We heard from the Visual Studio Code team that when renaming a file, just figuring out which import statements needed to be updated...
Read more >
What's new in Angular 10?
Upgrade to TypeScript 3.9, TSLib 2.0, and TS Lint v6. New date range picker in Angular Material 10; Warnings when using CommonJS imports...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found