plausible / plausible-tracker

Frontend library to interact with Plausible Analytics
https://github.com/plausible/plausible-tracker
MIT License
214 stars 46 forks source link

Crash on Vercel app #59

Open dev-andremonteiro opened 9 months ago

dev-andremonteiro commented 9 months ago

Versions

"plausible-tracker": "^0.3.8"

Describe the bug

After deployment with a vercel app, the hole app crashes and I get the error in the logs:

Unhandled Promise Rejection     {"errorType":"Runtime.UnhandledPromiseRejection","errorMessage":"TypeError: PTracker is not a function","reason":{"errorType":"TypeError","errorMessage":"PTracker is not a function","stack":["TypeError: PTracker is not a function","    at file:///var/task/vercel/path0/dist/chunks/pages/index_187a88b5.mjs:247:19","    at ModuleJob.run (node:internal/modules/esm/module_job:194:25)"]},"promise":{},"stack":["Runtime.UnhandledPromiseRejection: TypeError: PTracker is not a function","    at process.<anonymous> (file:///var/runtime/index.mjs:1276:17)","    at process.emit (node:events:529:35)","    at process.emit (node:domain:489:12)","    at emit (node:internal/process/promises:149:20)","    at processPromiseRejections (node:internal/process/promises:283:27)","    at process.processTicksAndRejections (node:internal/process/task_queues:96:32)"]}

Any idea of the reason we are getting this error ?