HdrHistogram / HdrHistogramJS

TypeScript port of HdrHistogram
BSD 2-Clause "Simplified" License
123 stars 21 forks source link

Error when upgrading to Angular 12 #38

Closed drowhunter closed 3 years ago

drowhunter commented 3 years ago

I have a project that when updated to Angular 12 I suddenly get an error such as

node_modules/hd-histogram-js/src/packedarray/PackedArray.spec.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig at node_modules/@ngtools/webpack/rsc/ivy/loader.js:59:26

alexvictoor commented 3 years ago

Hello Trevor, Thanks for reporting this issue. I will not be able to investigate this week, but I will take care of it asap. Meanwhile can you give more information on your project? I have the feeling you are importing HDR classes in a way that triggers an unnecessary compilation...

Le mar. 26 oct. 2021 à 04:47, Trevor Jones @.***> a écrit :

I have a project that when updated to Angular 12 I suddenly get an error such as

node_modules/hd-histogram-js/src/packedarray/PackedArray.spec.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig at @.***/webpack/rsc/ivy/loader.js:59:26

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/HdrHistogram/HdrHistogramJS/issues/38, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADKXNGPREHJXNHI3H64RPLUIYJFFANCNFSM5GWV5TCA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

drowhunter commented 3 years ago

Its funny because i've updated several projects to 12 without issue, and neither of them use hdr-histogram directly. But this one project is trying to compile hdr-histogram but only when I run ng-test.

I tried looking at my karma.conf and tsconfig.spec.json and theres nothing out of the ordinary.

drowhunter commented 3 years ago

Sorry Infigured this out. It was due to the test.ts fike being moved to the root of the project. In angular 11 it worked but in 12 it ends up including thw entire node_modules folder

alexvictoor commented 2 years ago

@drowhunter https://github.com/drowhunter I do not use angular so let me know if we should add an angular section in the doc

On Fri, Nov 26, 2021 at 10:40 AM Joanna Laskowska @.***> wrote:

@drowhunter https://github.com/drowhunter Please tell me how you resolve your issue. I have the same error. Did you move your test.ts something else or I should add some property to angular tsconfig file?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/HdrHistogram/HdrHistogramJS/issues/38#issuecomment-979827101, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADKXNFOMG5NWWPNICS73LDUN5IYNANCNFSM5GWV5TCA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.