matomo-org / matomo-org/matomo-nodejs-tracker
Import error: TypeError: Vn is not a constructor
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 117
- Forks
- 41
- PR merge metrics
- No merged PRs in 30d
Description
Due to our build-pipeline we can't use `require` to include the module. Using require it would't get bundled into the final build.
If we try to use import (`import * as MatomoTracker from "matomo-tracker";` ) we can bundle it correctly but it throws an error on runtime: `TypeError: Vn is not a constructor`
Is there anything we can do?
Thanks a lot
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported `import * as MatomoTracker from "matomo-tracker"` usage in the build pipeline and compare it with the working `require` form. Investigate the package's module and bundling entry points; done means the package bundles successfully and the imported tracker can be constructed without the runtime TypeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100