"TypeError: mod.require is not a function" error when trying use @sentry/tracing
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 9.8k
- Forks
- 326
- PR merge metrics
- No merged PRs in 30d
Description
Got an error TypeError: mod.require is not a function when trying to start compiled express server than use @sentry/tracing package.

Error occurs when performing this function call from @sentry/utils package:

Any ideas how this can be fixed? Thanks in advance!
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 with the compiled Express server entry point and reproduce the failure while loading @sentry/tracing. Inspect the @sentry/utils call shown in the issue and compare how the compiled module handles mod.require; done means the server starts without the TypeError when @sentry/tracing is used.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- express, javascript, nodejs
- Domain
- backend, build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100