Skip to content
This repository was archived by the owner on Oct 14, 2024. It is now read-only.

newest Zone.js doesn't work with mongoose db #164

Closed
EdSaleh opened this issue Sep 16, 2016 · 16 comments
Closed

newest Zone.js doesn't work with mongoose db #164

EdSaleh opened this issue Sep 16, 2016 · 16 comments

Comments

@EdSaleh
Copy link

EdSaleh commented Sep 16, 2016

old version compilers but create other problems.
the new version displays:

c:\Users\ahmed\Documents\Me\Projects\Netbine5\node_modules\zone.js\dist\zone-node.js:129
throw error;
^

TypeError: Cannot read property 'filter' of undefined
at zoneAwareEventListeners (c:\Users\ahmed\Documents\Me\Projects\Netbine5\node_modules\zone.js\dist\zone-node.js:715:13)
at Db.listeners (eval at createNamedFn (c:\Users\ahmed\Documents\Me\Projects\Netbine5\node_modules\zone.js\dist\zone-node.js:724:17), :3:36)
at Server.listener (c:\Users\ahmed\Documents\Me\Projects\Netbine5\node_modules\mongodb\lib\db.js:1786:15)
at Server.g (events.js:286:16)
at ZoneDelegate.invokeTask (c:\Users\ahmed\Documents\Me\Projects\Netbine5\node_modules\zone.js\dist\zone-node.js:225:37)
at Zone.runTask (c:\Users\ahmed\Documents\Me\Projects\Netbine5\node_modules\zone.js\dist\zone-node.js:125:47)
at Server.ZoneTask.invoke (c:\Users\ahmed\Documents\Me\Projects\Netbine5\node_modules\zone.js\dist\zone-node.js:293:33)
at emitTwo (events.js:106:13)
at Server.emit (events.js:191:7)
at Server.connectHandler (c:\Users\ahmed\Documents\Me\Projects\Netbine5\node_modules\mongodb\lib\server.js:329:10)
at Server.g (events.js:286:16)
at ZoneDelegate.invokeTask (c:\Users\ahmed\Documents\Me\Projects\Netbine5\node_modules\zone.js\dist\zone-node.js:225:37)
at Zone.runTask (c:\Users\ahmed\Documents\Me\Projects\Netbine5\node_modules\zone.js\dist\zone-node.js:125:47)
at Server.ZoneTask.invoke (c:\Users\ahmed\Documents\Me\Projects\Netbine5\node_modules\zone.js\dist\zone-node.js:293:33)
at emitOne (events.js:96:13)
at Server.emit (events.js:188:7)

@hongbo-miao
Copy link
Contributor

hongbo-miao commented Sep 16, 2016

hi @medozs I am using Mongoose, it works. Need more info, and maybe ask on Stack Overflow, so more people can help you locate the issue?

@EdSaleh
Copy link
Author

EdSaleh commented Sep 16, 2016

@hongbo-miao I had an old version and it works well, this version doesn't work with mongoose at all.

@EdSaleh
Copy link
Author

EdSaleh commented Sep 16, 2016

When I do any operation on the database, this error happens??
Even when trying to connect, this happens.

@EdSaleh
Copy link
Author

EdSaleh commented Sep 16, 2016

btw, i did this to config types:
types": [
//"body-parser",
// "compression",
//"cookie-parser",
//"express",
//"express-serve-static-core",
//"mime",
//"serve-static",
// "express",
"node"
]
using the old version, as this way was causing node package path conflict and even when removing one package, the above problem persists and still happens.

@imgsworld
Copy link

I also have this error。

qq20160917-0 2x

@EdSaleh
Copy link
Author

EdSaleh commented Sep 17, 2016

Yes, I get this error too!!
Someone please help!

@EdSaleh
Copy link
Author

EdSaleh commented Sep 17, 2016

I did different tests and discovered that is a bug with the new Zone.js, and the old Zone.js didn't have this problem of not being able to connect to db. But the old Zone.js causes different error when used with the new universal app.

@mhevery
Copy link

mhevery commented Sep 17, 2016

@alxhub could you have a look? I think t is related to your nice work

@EdSaleh
Copy link
Author

EdSaleh commented Sep 17, 2016

@mhevery @alxhub @imgsworld
I fixed the issue, I found that this version of the file zone-node.js committed 7 days ago (after replacing the current one with it in zone.js/dist/zone-node.js) worked well without any errors for my app.

@khanyuriy
Copy link

khanyuriy commented Sep 17, 2016

i have the same issue, and i am not using mongoose. I use mongodb driver directly
rolled back to 0.6.21. I see an issue at this version, async data is not rendered on server.

@hongbo-miao
Copy link
Contributor

hongbo-miao commented Sep 19, 2016

@medozs you are right, got same error. zone.js 0.6.21 works well. The issue starts from 0.6.22

@Quixomatic
Copy link

Any updates on this issue?

@MarkPieszak
Copy link
Contributor

Pat was suggesting if someone could open up an issue in the Zonejs repo for this as well.

I haven't heard any updates though.

@hongbo-miao
Copy link
Contributor

@MarkPieszak oh it is at angular/zone.js#448

@MarkPieszak
Copy link
Contributor

Perfect, thanks!

@PatrickJS
Copy link
Contributor

thanks for creating an issue on this. I'm closing for angular/zone.js#448

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

No branches or pull requests

8 participants