-
Notifications
You must be signed in to change notification settings - Fork 41
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
'Uncaught ReferenceError: Mongo is not defined' when using with angular2-boilerplate #5
Comments
@KeithGillette It seems as if you're using an old version of
|
Thanks for the fast reply, @DAB0mB! I believe I am using the latest version, as I just installed it 2 days ago:
I tried again by deleting my existing If I just run |
@KeithGillette Try to add the
This should make sure |
Thanks again, @DAB0mB. Unfortunately, if I specify the directory of my embedded Meteor project, I can't reliably get the
|
@KeithGillette the thing is that every package exports objects based on its definition in the |
Yes, as I've described, with one of the following work-arounds, I do successfully get
The remaining issue is just even after running meteor.meteor\packages
node_modules\meteor-client.js
|
I created a fresh install as follows to test this further:
For some reason, the resultant
However, through experimentation, I found that running
generated the following global scope which finally included
So maintaining a configuration file with the needed packages is much better than manually updating the |
@KeithGillette maintaining a config is indeed more optimized, but I find it weird that |
I have found that when using the --source api I do get my Mongo exposed, however adding mongo to the imports doesn't expose it at all. It would be good to get an "ignore" added to the config maybe, I have some meteor packages that cause headaches with the bundler (mainly angular2-compilers and packages related to unit and e2e tests) So when using -s api, I remove them first, generate the meteor-client.js, then add them back in. If I could work out the reason why I don't get the Mongo to work with the imports it would be better, because I would just define the packages i need in the config instead. |
Closing due to inactivity and cleanup. |
In attempting to use Webpack for an Angular-Meteor angular2-boilerplate client build, I get the following browser console error when running the client:
I have run
meteor-client bundle
with the followingmeteor-client.config.json
adapted from the Angular-Meteor WhatsApp Clone with Meteor and Ionic 2 CLI to generatenode_modules/meteor-client.js
and addedimport 'meteor-client';
as the first line inclient/main.ts
.In inspecting
node_modules/meteor-client.js
, I see the thatMongo
is not included in the section that establishes global scope:Any tips on troubleshooting appreciated!
The text was updated successfully, but these errors were encountered: