-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
uncaughtException: rollbar_1.default is not a constructor #1089
Comments
@surisoko Thank you for the report. const Rollbar = require('rollbar') should work when setting Node 16 supports ES modules, and allows setting import Rollbar from 'rollbar'; In your tsconfig compilerOptions, you should also set This is covered in the doc here: https://docs.rollbar.com/docs/importing-or-requiring-rollbar |
Hi @waltjones
|
@surisoko It looks like you might be setting |
There is no such configuration in my package.json |
The funny thing is that it doesn't work if I import rollbar from app.ts, but does work from other subfolders |
This error is thrown when I deploy my nodejs project
And my code:
rollbar.ts
app.ts
nodejs: 16
express: 4.18.2
rollbar: 2.26.1
The text was updated successfully, but these errors were encountered: