-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Bug: Runtime TypeError ("Cannot read property 'call' of undefined") #6196
Comments
I haven't seen any similar issues yet, so without a repro there isn't much we can do to investigate. Can you try to make a simple one that we can look at? It might be something simple but there's just no way of knowing without a repro. |
This issue is related to webpack/webpack#959 and PatrickJS/PatrickJS-starter#456. But since webpack config is embedded in cli, we cannot apply the same fix. |
Getting the same error. |
i had this issue and it was because i was not including vendor.bundle.js |
Getting the same error. |
Same here, locally works but not in production |
TL;DR: the solution provided here was a false hope, not solving the issue Edit: Here is the post where I found the solution Edit2: It seems that the problem has not resolved only less frequent in my use case. |
@Leffe108 If Ionic-cli is like angular-cli you musn't use In my case the error is just the oposite, Edit: I manually install webpack@latest and webpack-dev-server@latest and it works but I guess it should be arranged by other way |
Hello all, |
Sorry for getting a bit of topic including ionic commands above. But to get to a solution the team member above asked for a simple repo or steps to reproduce. So to get forward we need to find out what a minimal repo that reproduces this looks like and provide it to the team so the problem can get solved. |
Same error here ... the error doesn't help much to debug....quite annoying |
Dear Leif Linse,
To localize the problem, I do the following
1. Build the project from scratch “kendo-ui-first-look” followed by http://www.telerik.com/blogs/using-kendo-ui-with-angular-2.
2. Update to the latest packages: npm, webpack, @angular/cli, webpack-dev-server.
3. Running: ng build --env=prod --output-hashing none
4. Transfer dist to the machine (with Lighttpd server)
5. Launch in Chrome
The same problem occurs on this virgin project.
Thank you in advance, Marianna
|
For me the error is gone with 1.3.0-beta.1 |
mariannafld: Thanks for providing a way to reproduce it. I'm sorry if I sounded like I could fix it, but I just re-read the status of the thread and saw that a lot of people had the problem, but none had answered the question from Angular member to provide repo or steps to reproduce. But if it is solved in 1.3.0-beta.1 it may be that the team found a way to reproduce it or fix it anyway. |
Update @angular/cli to version 1.3.0-beta.1 did not solved the problem for me. Angular team, please, try to reproduce this in clean project http://www.telerik.com/blogs/using-kendo-ui-with-angular-2 (without installing kendo-ui ). |
Hmmm... What version of typescript are you using? |
Seems like there's no fix to this issue yet. The funny thing is, 1 min it was working fine and the next min boom things fell apart. |
Yes... Still no solution. Typescript update didn't lead to desired results:(. |
@codestuffs ah thanks...I thought I was going crazy but apperently I'm not the only one were things are working fine and the next time not. :-) Maybe this could help |
@richardsengers you are my hero. lol. I downgraded zone.js to 0.8.12 and voilà! it worked. |
Oh, @codestuffs, I want to be happy like you, and promote @richardsengers to be a hero for all! But, my current zone.js is 0.8.12. And the deployment still doesn't work. Could you, please, provide me with a list of your main npm pacakges? |
Currently my project is running with these dependencies and without incidents since last webpack manual installation:
|
@mariannafld I've removed all the ^ from the packages so these are the versions which are installed
Hope this helps you a bit |
@mariannafld here is my list of npm packages
|
Good day to all. "dependencies": { One more thread I found that talk about the same problem in different context: |
@mariannafld |
@filipesilva - here is a repro: |
I had the same problem where everything was working then failed. using @FernandoX7 worked
|
There are various references to the |
Hello, In our case it was an import of third part library that cause the error .... |
@kylecordes The workaround I found at: is to add --sourcemaps:
@hamouda06 - In my case too - importing QuillModule from ngx-quill |
Updating to the recent @angular/cli@1.6.6 version has resolved this issue for me. |
@andyrue I can confirm the same. Just upgraded from Angular-CLI 1.6.5 to 1.6.6 and the issues is now gone. |
I was hitting this same problem with prod builds. Workaround was to add --sourcemaps to the ng build command line. Without this parameter I keep hitting the problem |
I was running into this issue when doing a |
anyone find any solution :) |
try |
Simply add the scripts in below mentioned order and it will work 👍 `<script type="text/javascript" src="/bundles/inline.bundle.js"></script> <script type="text/javascript" src="/bundles/polyfills.bundle.js"></script> <script type="text/javascript" src="/bundles/scripts.bundle.js"></script> <script type="text/javascript" src="/bundles/vendor.bundle.js"></script> <script type="text/javascript" src="/bundles/main.bundle.js"></script>`Happy Coding !!! Thanks, |
still getting this error... my zone.js version is 0.8.18 so i don't think it still has the bug in version 0.8.13 and the order of scripts in my index.html is exactly as recommened: main.bundle.js goes after vendor.bundle.js |
In my case order was the issue. Mine zone.js version is 0.8.19. The issue is still reproducible if I change the scripts order. |
… custom webpack require Libraries using the custom `__webpack_require__` won't correctly load new imports. Partially address #6196.
I see this issue in my project when using |
Same, my lazy-loaded modules are throwing this error on rebuilds using |
Same issue as @AndrewEckart, getting frustrated having to kill and restart an aot build every time I make changes |
Ionic is still as it is for long time: a lazy stitched broken bunch of crappy code without the need of doing anything professional. Everything they touch, even their professional services for which I have subscribed are loaded with bugs. They are always running AFTER new tech and features but for what reason? Bad design choices, bad community handling. Ionic is using their community to fix bugs and thats it, they pushing the nerve of their peer members to the limits to find out if someone will do the fixing for them. Rolling out Ionic4....already? Make one release stable for god sake. Ionic team please do less so we can both achieve more. |
I am getting the same error when using |
We have the same error as @AndrewEckart, everything serves fine, but on rebuild, the error is thrown |
Same Issue, fixes when rebuild application, problem occurs when for example move a module to another folder. |
The solution for me was rather simple. Clear cache and hard reload. This seems to happen when I add a new page or service and don't restart the dev server. |
Looks like it's related to the view engine compiler. With the transition to ivy, this will hopefully be fixed in the next months. Closing the issue for now but we should definitely revisit it once we release Still, if I'm missing anything, feel free to create a new issue with details and demo where we can reproduce the problem. |
Was this for entry field there should follow this order. |
I did have a webpack version 4.8.3. I changed my webpack.config.js to export a function instead of an object and then I ran the command The webpack version 4.33.0 (after I did npm install webpack@latest -> 4.33.0) seems to have the fix for this. Boom my issue was resolved. The one thing I dont understand is that the I havent changed any configuration nor I have changed any code since 60days prior to todays date(june 4th). This version of webpack seems to have some issue that did not come up when I first started using it. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug Report or Feature Request (mark with an
x
)General information
We have an Angular 2 application running and I was asked to upgrade Angular (including it's CLI) to the newest version (Note: I'm not really involved in the project, so I don't know how the application is built or where the dependencies are used).
I tried upgrading using the 1.0 update guide.
Building the app with ng build works (no error messages), but when I navigate to the website, I get an error message in the console.
Versions
Repro steps / packages
I don't know what exactly causes this issue, therefore I don't know how to reproduce it.
packages.json
.angular-cli.json
tsconfig.json
The log given by the failure
I get this console error message at runtime (application is then stuck at "Loading..."):
Webpack is trying to get the module with the Id 0:
modules[0] is undefined though.
Although when checking stats.json using the webpack analyzer, the module with the id 0 (./~/@angular/core/@angular/core.es5.js) exists.
Desired functionality
Proper bootstrapping of the application.
Mention any other details that might be useful
Someone had a similar problem and according to sokra this issue was fixed in 2.5.0. I got version 2.5.0 of webpack and put it manually in the node_modules folder of angular cli but the issue still persists.
When I create a new application using ng new [name], it works fine. As soon as I put my src files and my dependencies in there I get this error.
The text was updated successfully, but these errors were encountered: