angulartics2
angulartics2 copied to clipboard
ERROR ReferenceError: clicky is not defined
- [x] bug report
I am trying to use clicky on my project. But I get this error.
ERROR ReferenceError: clicky is not defined
at Angulartics2Clicky.pageTrack (angulartics2-clicky.js:31)
at SafeSubscriber._next (angulartics2-clicky.js:17)
at SafeSubscriber.__tryOrUnsub (Subscriber.js:183)
at SafeSubscriber.next (Subscriber.js:122)
at Subscriber._next (Subscriber.js:72)
at Subscriber.next (Subscriber.js:49)
at FilterSubscriber._next (filter.js:33)
at FilterSubscriber.next (Subscriber.js:49)
at ReplaySubject.next (Subject.js:39)
at ReplaySubject.nextInfiniteTimeWindow (ReplaySubject.js:29)
Before I got to the error above, I had these errors, which prevented from run:
eeinject not found
in node_modules\angulartics2\fesm2015\angulartics2.js node_modules\angulartics2\clicky\fesm2015\angulartics2-clicky.js
after removing the "ee" from each "eedefinedInjectable" and "eeinject" I could run the project and then in the browser console I got the "clicky is not defined" error.
make sure the version of angular you're using is compatible https://github.com/angulartics/angulartics2/blob/master/README.md#dependencies
@scttcper I think I am using the right versions:
"@angular-redux/store": "^9.0.0",
"@angular/animations": "^7.0.0",
"@angular/cdk": "^7.0.0",
"@angular/common": "^7.0.0",
"@angular/compiler": "^7.0.0",
"@angular/core": "^7.0.0",
**"angulartics2": "^7.5.2",**
I got nothing dog
I get the same error when using clicky with angular universal. The error happens when running the prerender task which is executed in a node environment. Hence, the scripts are not properly loaded and the clicky
symbol doesn't exist.
Is there any way to disable clicky conditionally (i.e. in this case when execution happens in a node environment)?