PiwikPRO / ngx-piwik-pro

Dedicated Piwik PRO library that helps with implementing Piwik PRO Tag Manager and the Piwik PRO tracking client in Angular 8+ applications.
MIT License
3 stars 3 forks source link

window is undefined error during Angular 17 SSR prerendering #24

Open timtim5174 opened 9 months ago

timtim5174 commented 9 months ago

Hello,

first of all: since I don't write issue reports so often on public projects, I apologize if I don't follow a formal process.

Currently I'm working on an Angular 17 website with SSR prerendering. Since your latest package update (v1.1.0) I'm getting the error window is undefined during npm build.

I guess it belongs to this line of code in your latest change.

However, merging this PR and solving the merge conflict should fix it.

v1.0.2 works fine

danieltwork commented 9 months ago

Hi @timtim5174 , we have released a new version to fix your problem, could you verify in your environment if version 1.1.1 fixes your problem and you are satisfied?

timtim5174 commented 9 months ago

Hey @danieltwork thanks for your quick response. I've updated my version to 1.1.1, but the error still exist during build. Probably there is still a missing unchecked window reference in the code?