Skip to content

Uncaught ReferenceError: Mongo is not defined #7

@michaelb-01

Description

@michaelb-01

I recently updated angular-cli and now i'm getting the following error:

Uncaught ReferenceError: Mongo is not defined

I've re-bundled meteor with meteor-client bundle -s api but that still doesn't help..

These are my versions:

Angular CLI: 1.6.8 (e)
Node: 9.5.0
OS: darwin x64
Angular: 5.2.4
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

@angular/cdk: 5.2.0
@angular/cli: 1.6.8
@angular/material: 5.2.0
@angular-devkit/build-optimizer: 0.0.42
@angular-devkit/core: 0.0.29
@angular-devkit/schematics: 0.0.52
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.9.8
@schematics/angular: 0.1.17
typescript-extends: 1.0.1
typescript: 2.5.3
webpack-dev-server: 2.11.1
webpack: 3.10.0

I've explicitly added Mongo to my meteor packages but that didn't help:

meteor-base@1.3.0             # Packages every Meteor app needs to have
mobile-experience@1.0.5       # Packages for a great mobile UX
mongo                   # The database Meteor supports right now
blaze-html-templates@1.0.4 # Compile .html files into Meteor Blaze views
reactive-var@1.0.11            # Reactive variable for tracker
tracker@1.1.3                 # Meteor's client-side reactive programming library

standard-minifier-css@1.4.0   # CSS minifier run for production mode
standard-minifier-js@2.3.1    # JS minifier run for production mode
es5-shim@4.7.0                # ECMAScript 5 compatibility for older browsers
ecmascript@0.10.0              # Enable ECMAScript2015+ syntax in app code
shell-server@0.3.1            # Server-side component of the `meteor shell` command

insecure@1.0.7                # Allow all DB writes from clients (for prototyping)

accounts-base
accounts-ui
accounts-password
anti:fake
reywood:publish-composite
barbatus:typescript

I've installed meteor-client and added import 'meteor-client'; to my api/main.ts as suggested here https://github.com/darkbasic/angularcli-meteor/issues/2 however then I get the following error:

ReferenceError: document is not defined

Any ideas on how to fix this? I've been stuck for two days!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions