Skip to content

Uncaught ReferenceError: Mongo is not defined #7

Open
@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:

[email protected]             # Packages every Meteor app needs to have
[email protected]       # Packages for a great mobile UX
mongo                   # The database Meteor supports right now
[email protected] # Compile .html files into Meteor Blaze views
[email protected]            # Reactive variable for tracker
[email protected]                 # Meteor's client-side reactive programming library

[email protected]   # CSS minifier run for production mode
[email protected]    # JS minifier run for production mode
[email protected]                # ECMAScript 5 compatibility for older browsers
[email protected]              # Enable ECMAScript2015+ syntax in app code
[email protected]            # Server-side component of the `meteor shell` command

[email protected]                # 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