Skip to content
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

bugsnag.ts in npm package #631

Closed
GDreyV opened this issue Oct 16, 2019 · 6 comments
Closed

bugsnag.ts in npm package #631

GDreyV opened this issue Oct 16, 2019 · 6 comments
Labels
bug Confirmed bug released This feature/bug fix has been released

Comments

@GDreyV
Copy link
Contributor

GDreyV commented Oct 16, 2019

By some reason npm package v 6.4.2 has extra empty .ts file in @bugsnag\browser\dist\types\bugsnag.ts which causes error on build Angular app:
ERROR in ./node_modules/@bugsnag/browser/dist/types/bugsnag.ts
Module build failed (from ./node_modules/@ngtools/webpack/src/index.js):
Error: /root/src/frontend/node_modules/@bugsnag/browser/dist/types/bugsnag.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.
The missing file seems to be part of a third party library. TS files in published libraries are often a sign of a badly packaged library. Please open an issue in the library repository to alert its author and ask them to package the library using the Angular Package Format (https://goo.gl/jB3GVv).

@bengourley
Copy link
Contributor

This reason this file was added is discussed in #523.

Maybe Angular's AOT mode is fixed now and we can remove it…

@bengourley
Copy link
Contributor

What version of Angular are you using? And how are you running it (in particular, things like --ssr or --aot flags)?

Some more information about your setup will help us assist you. Thanks!

@GDreyV
Copy link
Contributor Author

GDreyV commented Oct 16, 2019

I'm building it in pretty silly way, just ng build --eval-source-map --prod. With ng build --eval-source-map --prod --aot I'm getting exactly the same error. Angular version is "@angular/core": "~7.2.0"

@GDreyV
Copy link
Contributor Author

GDreyV commented Oct 16, 2019

@bengourley , it looks that I found a solution. I might be wrong but the fix 0127ac4 is incorrect. Instead package.json should be updated with:
"browser": { "dist/types/bugsnag": "./dist/bugsnag.js" }
it fixes the problem with 'module not found'. Do you need a pull request from me? Is there any way to fix it asap as it's a blocker issue for angular.

@mattdyoung
Copy link
Contributor

Hi @GDreyV

Thanks for the PR! Our team will review it and follow up with any comments there.

@mattdyoung mattdyoung added the bug Confirmed bug label Oct 18, 2019
@bugsnagbot bugsnagbot added backlog We hope to fix this feature/bug in the future scheduled Work is starting on this feature/bug and removed backlog We hope to fix this feature/bug in the future labels Oct 18, 2019
@mattdyoung
Copy link
Contributor

Fixed in v6.4.3

@mattdyoung mattdyoung added released This feature/bug fix has been released and removed scheduled Work is starting on this feature/bug labels Oct 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bug released This feature/bug fix has been released
Projects
None yet
Development

No branches or pull requests

4 participants