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

hero-loader: Error created and attaching module async #11

Open
andchir opened this issue Aug 24, 2019 · 4 comments · May be fixed by evanjmg/herodevs-packages#1 or #18
Open

hero-loader: Error created and attaching module async #11

andchir opened this issue Aug 24, 2019 · 4 comments · May be fixed by evanjmg/herodevs-packages#1 or #18

Comments

@andchir
Copy link

andchir commented Aug 24, 2019

I use Angular 8.2.3.
I follow the example as described here:
https://github.com/herodevs/herodevs-packages/tree/master/projects/lazy

When I hover the cursor to element, an error appears:

ERROR Error: Uncaught (in promise): Error created and attaching module async.
    at D (polyfills-es2015.js?4.0.6:1)
    at D (polyfills-es2015.js?4.0.6:1)
    at polyfills-es2015.js?4.0.6:1
    at a.invokeTask (polyfills-es2015.js?4.0.6:1)
    at Object.onInvokeTask (main-es2015.js?4.0.6:1)
    at a.invokeTask (polyfills-es2015.js?4.0.6:1)
    at i.runTask (polyfills-es2015.js?4.0.6:1)
    at y (polyfills-es2015.js?4.0.6:1)

In the developer console, I see that the JS file is loaded successfully.

I tried turning on and off for Ivy, but without result.

@andreElrico
Copy link

andreElrico commented Sep 10, 2019

Everything worked for me as well. However today I have the same error.

EDIT

I could somewhat reproduce this error. After installing:

npm install ngx-tree-data --save

I get warns.

npm WARN ngx-tree-data@0.1.3 requires a peer of @angular/cdk@8.1.2 but none is installed. You must install peer dependencies yourself.
npm WARN ngx-tree-data@0.1.3 requires a peer of @angular/common@8.2.0 but none is installed. You must install peer dependencies yourself.
npm WARN ngx-tree-data@0.1.3 requires a peer of @angular/compiler@8.2.0 but none is installed. You must install peer dependencies yourself.
npm WARN ngx-tree-data@0.1.3 requires a peer of @angular/core@8.2.0 but none is installed. You must install peer dependencies yourself.
npm WARN ngx-tree-data@0.1.3 requires a peer of @angular/forms@8.2.0 but none is installed. You must install peer dependencies yourself.
npm WARN ngx-tree-data@0.1.3 requires a peer of @angular/material@8.1.2 but none is installed. You must install peer dependencies yourself.
npm WARN ngx-tree-data@0.1.3 requires a peer of @angular/platform-browser@8.2.0 but none is installed. You must install peer dependencies yourself.
npm WARN ngx-tree-data@0.1.3 requires a peer of @angular/platform-browser-dynamic@8.2.0 but none is installed. You must install peer dependencies yourself.
npm WARN ngx-tree-data@0.1.3 requires a peer of @angular/router@8.2.0 but none is installed. You must install peer dependencies yourself.
npm WARN ngx-tree-data@0.1.3 requires a peer of core-js@2.5.4 but none is installed. You must install peer dependencies yourself.
npm WARN ngx-tree-data@0.1.3 requires a peer of save-dev@2.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN ngx-tree-data@0.1.3 requires a peer of tslib@1.9.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

and the module loader does not work anymore.

ERROR Error: Uncaught (in promise): Error created and attaching module async.

STATUS

Cant get it to work despite resolving the PEER dependency warnings,

@michaelkrog
Copy link

michaelkrog commented Sep 18, 2019

The error seems to be output if any error occurs when bootstrapping the lazy-loaded module.

Edit
The error message comes from here.
https://github.com/herodevs/herodevs-packages/blob/master/projects/dynamic-service/src/lib/dynamic-component.service.ts#L113-L117

Any occur that occurs in that try/catch is swallowed and never output.

evanjmg added a commit to evanjmg/herodevs-packages that referenced this issue Mar 1, 2020
This should resolve herodevs#11
@evanjmg
Copy link

evanjmg commented Mar 1, 2020

Made a PR - hopefully it will be merged ^

@boltex
Copy link

boltex commented Dec 7, 2021

If I may ask respectfully... What's the holdup in merging this pull request?

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 a pull request may close this issue.

5 participants