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

Fix angular build with correct resolving referenced modules #632

Closed
wants to merge 1 commit into from
Closed

Fix angular build with correct resolving referenced modules #632

wants to merge 1 commit into from

Conversation

GDreyV
Copy link
Contributor

@GDreyV GDreyV commented Oct 16, 2019

Instead of creating stub file provide valid browser alias.
Initial issue #523
Updated issue #631

@tomlongridge
Copy link
Contributor

@GDreyV - are you able to provide a repro case for this? I've tried it with both Bugsnag Angular example (upgraded to 7.2.0) and the Angular basic example (https://angular.io/start) with Bugsnag added and neither result in the error you are seeing.

We need reproduction instructions/project to make this PR something we can release.

@GDreyV
Copy link
Contributor Author

GDreyV commented Oct 17, 2019

Here's the test repository to reproduce the problem: https://github.com/GDreyV/bugsnag-angular-test
To be sure that we are on the same page I used following steps to reproduce the issue:

npm list -g --depth=0
+-- @angular/[email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
`-- [email protected]

ng new bugsnag-test
cd bugsnag-test
npm install --save @bugsnag/js @bugsnag/core @bugsnag/plugin-angular

update app.module.ts with bugsnag init

ng build --eval-source-map --prod --aot
ERROR in ./node_modules/@bugsnag/browser/dist/types/bugsnag.ts
Module build failed (from ./node_modules/@ngtools/webpack/src/index.js):
Error: d:\Work\Sympli\figma\bugsnag\case\bugsnag-test\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).

@tomlongridge
Copy link
Contributor

Reviewed and tested it - this looks good. Merging changes via #633.

Thanks @GDreyV !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants