ardatan/meteor-webpack

Error: Can only call onCreateUser once

s7dhansh opened this issue · 4 comments

I am getting this error while using Accounts.onCreateUser in my server files.
I am using HMR on both server and client.

Are you using the latest version of meteor-webpack? Can you provide me with your package list?

Yes, I have git cloned the latest master.

meteor@1.9.2
hot-code-push@1.0.4
ddp@1.4.0
mongo@1.6.0
tracker@1.2.0
webapp@1.7.1
ejson@1.1.0

standard-minifier-css@1.5.2   # CSS minifier run for production mode
standard-minifier-js@2.4.0    # JS minifier run for production mode
react-meteor-data
jagi:astronomy
mickaelfm:vermongo
reywood:publish-composite
http@1.4.1
random@1.1.0
settlin:astronomy-softremove-behavior
email@1.2.3
accounts-password@1.5.1
accounts-google@1.3.2
accounts-facebook@1.3.2
service-configuration@1.0.11
dynamic-import@0.5.0
shell-server@0.4.0
settlin:reactive-table
meteorhacks:ssr
server-render@0.3.1
settlin:accounts-phone
meteorhacks:aggregate
alanning:roles
accounts-base@1.4.3
settlin:astronomy-meta-behavior
montiapm:agent
ardatan:webpack
ardatan:webpack-dev-middleware
disable-lazy # for disabling lazy-loads of astronomy

Ok. Sounds like we need to take a look and find where the onCreateUser hooks are stored, and add them to the server cleaning logic in webpack-dev-server. I'll take a look at this when I can, feel free to submit a PR in the meantime.

Thank you.

#63 fixes it. I have not been able to test it properly as I am still struggling with using webpack with my app. But at least that error has been resolved.