I have to reinstall @sentry/browser very frequenly
- [ ] Review the documentation: https://docs.sentry.io/
- [ ] Search for existing issues: https://github.com/getsentry/sentry-javascript/issues
- [ ] Use the latest release: https://github.com/getsentry/sentry-javascript/releases
- [ ] Provide a link to the affected event from your Sentry account
Package + Version
- [x]
@sentry/browser - [x]
@sentry/node - [ ]
raven-js - [ ]
raven-node(raven for node) - [x] other: Angular
Version:
@sentry/browser: 5.4.3
Description
This issue is happening with me very frequently. Some times I compile my angular project and it shows the following error:
ERROR in /home/project/node_modules/@sentry/utils/dist/syncpromise.d.ts (1,36): ',' expected.
ERROR in /home/project/node_modules/@sentry/types/dist/severity.d.ts (4,13): In ambient enum declarations member initializer must be constant expression.
ERROR in /home/project/node_modules/@sentry/types/dist/severity.d.ts (8,15): In ambient enum declarations member initializer must be constant expression.
ERROR in /home/project/node_modules/@sentry/types/dist/severity.d.ts (10,11): In ambient enum declarations member initializer must be constant expression.
ERROR in /home/project/node_modules/@sentry/types/dist/severity.d.ts (12,12): In ambient enum declarations member initializer must be constant expression.
ERROR in /home/project/node_modules/@sentry/types/dist/severity.d.ts (14,13): In ambient enum declarations member initializer must be constant expression.
ERROR in /home/project/node_modules/@sentry/types/dist/severity.d.ts (16,16): In ambient enum declarations member initializer must be constant expression.
ERROR in /home/project/node_modules/@sentry/types/dist/hub.d.ts (26,25): Generic type 'Client<O, Options>' requires 2 type argument(s).
ERROR in /home/project/node_modules/@sentry/types/dist/hub.d.ts (61,18): Generic type 'Client<O, Options>' requires 2 type argument(s).
ERROR in /home/project/node_modules/@sentry/types/dist/status.d.ts (4,15): In ambient enum declarations member initializer must be constant expression.
ERROR in /home/project/node_modules/@sentry/types/dist/status.d.ts (6,15): In ambient enum declarations member initializer must be constant expression.
ERROR in /home/project/node_modules/@sentry/types/dist/status.d.ts (8,15): In ambient enum declarations member initializer must be constant expression.
ERROR in /home/project/node_modules/@sentry/types/dist/status.d.ts (10,17): In ambient enum declarations member initializer must be constant expression.
ERROR in /home/project/node_modules/@sentry/types/dist/status.d.ts (12,15): In ambient enum declarations member initializer must be constant expression.
ERROR in /home/project/node_modules/@sentry/types/dist/status.d.ts (14,14): In ambient enum declarations member initializer must be constant expression.
ERROR in /home/project/node_modules/@sentry/types/dist/client.d.ts (16,43): ',' expected.
ERROR in /home/project/node_modules/@sentry/types/dist/severity.d.ts (6,13): In ambient enum declarations member initializer must be constant expression.
ERROR in /home/project/node_modules/@sentry/utils/dist/syncpromise.d.ts (2,30): ',' expected.
ERROR in /home/project/node_modules/@sentry/utils/dist/syncpromise.d.ts (30,19): ',' expected.
ERROR in /home/project/node_modules/@sentry/utils/dist/syncpromise.d.ts (30,33): ',' expected.
ERROR in /home/project/node_modules/@sentry/utils/dist/syncpromise.d.ts (1,38): Type parameter name cannot be 'any'
ERROR in /home/project/node_modules/@sentry/utils/dist/syncpromise.d.ts (2,32): Type parameter name cannot be 'any'
ERROR in /home/project/node_modules/@sentry/utils/dist/syncpromise.d.ts (6,25): Generic type 'HandlerOnSuccess' requires 3 type argument(s).
ERROR in /home/project/node_modules/@sentry/utils/dist/syncpromise.d.ts (6,58): Generic type 'HandlerOnFail' requires 2 type argument(s).
ERROR in /home/project/node_modules/@sentry/utils/dist/syncpromise.d.ts (32,22): Generic type 'HandlerOnFail' requires 2 type argument(s).
ERROR in /home/project/node_modules/@sentry/hub/dist/hub.d.ts (39,26): Generic type 'Client<O, Options>' requires 2 type argument(s).
ERROR in /home/project/node_modules/@sentry/hub/dist/hub.d.ts (54,25): Generic type 'Client<O, Options>' requires 2 type argument(s).
ERROR in /home/project/node_modules/@sentry/hub/dist/hub.d.ts (70,25): Generic type 'Client<O, Options>' requires 2 type argument(s).
ERROR in /home/project/node_modules/@sentry/hub/dist/interfaces.d.ts (9,14): Generic type 'Client<O, Options>' requires 2 type argument(s).
ERROR in /home/project/node_modules/@sentry/core/dist/baseclient.d.ts (39,91): Generic type 'Client<O, Options>' requires 2 type argument(s).
ERROR in /home/project/node_modules/@sentry/core/dist/sdk.d.ts (3,43): Generic type 'Client<O, Options>' requires 2 type argument(s).
ERROR in /home/project/node_modules/@sentry/core/dist/sdk.d.ts (11,47): Generic type 'Client<O, Options>' requires 2 type argument(s).
The above gets fixed when I reinstall @sentry/browser and do npm audit fix
Is this an issue with the package or npm itself?
Any update on this, the problem is not fixed yet. Beacause of this I am not able to build by project.
I've never seen an issue like this before. You'll have to provide a repro case in order for me to fix this.
I think the problem was because my Angular version was very old (4.4) . I am currently migrating my project to Angular 8, If the problem still persist I will reopen this issue. Thanks for for time.
@kumaraditya1999 ok! Thanks