Skip to content

Bug: Angular 4 spa + external lib using other node_modules libs on Windows #246

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

Closed
xeax opened this issue Jan 30, 2018 · 5 comments
Closed
Labels
blocked: retry with latest Retry with latest release or head. outdated type: bug

Comments

@xeax
Copy link

xeax commented Jan 30, 2018

Then using relative "baseUrl": "." in tsconfig.json, somethere in internals generated webpack paths contains sometimes capital drive letter (i.e. G:\mc), sometimes not (i.e. g:\mc).

In Dev mode (ng serve --app=...) this caused error in browser:
TypeError: WEBPACK_IMPORTED_MODULE_1__angular_core.Version is not a constructor

But "ng build --prod --app=..." works fine.

Issue solved by using absolute paths (i.e. "baseUrl": "G:\mc") in tsconfig.json

PS: May be it is angular/cli or webpack bug.

@xeax
Copy link
Author

xeax commented Jan 30, 2018

Is it the same bug?
webpack/memory-fs#53

@jeffbcross
Copy link
Member

Could you provide a simplified reproduction in a Github repo so we could test this?

@xeax
Copy link
Author

xeax commented Feb 3, 2018

Here is repro:
https://github.com/xeax/bug2

Error only on Windows OS. My version is Win 8.1

Error text in browser after "ng serve --app=backoffice":
Uncaught TypeError: WEBPACK_IMPORTED_MODULE_1__angular_core._11 is not a constructor
at Object.../../../compiler/@angular/compiler.es5.js (compiler.es5.js:23)
at webpack_require (bootstrap 01a7b3a092e77dc21fc9:54)
at Object.../../../platform-browser-dynamic/@angular/platform-browser-dynamic.es5.js (core.es5.js:14822)
at webpack_require (bootstrap 01a7b3a092e77dc21fc9:54)
at Object.../../../../../apps/backoffice/src/main.ts (hmr.ts:15)
at webpack_require (bootstrap 01a7b3a092e77dc21fc9:54)
at Object.0 (public_api.ts:14)
at webpack_require (bootstrap 01a7b3a092e77dc21fc9:54)
at webpackJsonpCallback (bootstrap 01a7b3a092e77dc21fc9:25)
at main.bundle.js:1

Screenshot of problem in Chrome DevTools:
devtools-bug2

@vsavkin
Copy link
Member

vsavkin commented Sep 28, 2018

Could you try it with the latest version of Nx?

@FrozenPandaz FrozenPandaz added the blocked: retry with latest Retry with latest release or head. label Nov 23, 2018
@vsavkin vsavkin closed this as completed Apr 15, 2019
FrozenPandaz added a commit to FrozenPandaz/nx that referenced this issue Jan 12, 2023
@github-actions
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
blocked: retry with latest Retry with latest release or head. outdated type: bug
Projects
None yet
Development

No branches or pull requests

5 participants