InfomediaLtd / angular2-materialize

Angular 2 support for Materialize CSS framework.
https://infomedialtd.github.io/angular2-materialize/
MIT License
406 stars 139 forks source link

Error in browser console after importing MaterializeModule in angular2-meteor environment #381

Open kevinklinegargar opened 7 years ago

kevinklinegargar commented 7 years ago

I got an error when I importing the MaterializeModule. My project is using meteorjs and angular2. is this a js compiler issue?

Here's the error in the Browser:

modules.js:88375 Uncaught SyntaxError: Unexpected token export
es5-shim.js:17 Uncaught TypeError: Cannot read property 'meteorInstall' of undefined
    at es5-shim.js:17
    at es5-shim.js:2792
promise.js:17 Uncaught TypeError: Cannot read property 'meteorInstall' of undefined
    at promise.js:17
    at promise.js:585
babel-runtime.js:17 Uncaught TypeError: Cannot read property 'meteorInstall' of undefined
    at babel-runtime.js:17
    at babel-runtime.js:163
ecmascript-runtime-client.js:17 Uncaught TypeError: Cannot read property 'meteorInstall' of undefined
    at ecmascript-runtime-client.js:17
    at ecmascript-runtime-client.js:110
ejson.js:18 Uncaught TypeError: Cannot read property 'meteorInstall' of undefined
    at ejson.js:18
    at ejson.js:861
diff-sequence.js:18 Uncaught TypeError: Cannot read property 'EJSON' of undefined
    at diff-sequence.js:18
    at diff-sequence.js:297
geojson-utils.js:17 Uncaught TypeError: Cannot read property 'meteorInstall' of undefined
    at geojson-utils.js:17
    at geojson-utils.js:442
id-map.js:18 Uncaught TypeError: Cannot read property 'EJSON' of undefined
    at id-map.js:18
    at id-map.js:123
random.js:18 Uncaught TypeError: Cannot read property 'meteorInstall' of undefined
    at random.js:18
    at random.js:371
mongo-id.js:17 Uncaught TypeError: Cannot read property 'EJSON' of undefined
    at mongo-id.js:17
    at mongo-id.js:142
minimongo.js:17 Uncaught TypeError: Cannot read property 'DiffSequence' of undefined
    at minimongo.js:17
    at minimongo.js:5100
check.js:17 Uncaught TypeError: Cannot read property 'meteorInstall' of undefined
    at check.js:17
    at check.js:586
retry.js:18 

here's my package.json

{
  "name": "angular2-meteor-base",
  "private": true,
  "scripts": {
    "start": "meteor run",
    "start:prod": "meteor run --production",
    "build": "meteor build ./build/",
    "clear": "meteor reset",
    "meteor:update": "meteor update --all-packages",
    "test": "meteor test --driver-package practicalmeteor:mocha",
    "test:ci": "meteor test --once --driver-package dispatch:mocha-phantomjs"
  },
  "devDependencies": {
    "@types/chai": "3.4.34",
    "@types/meteor": "^1.3.31",
    "@types/mocha": "2.2.34",
    "chai": "3.5.0",
    "chai-spies": "0.7.1",
    "meteor-node-stubs": "0.2.4"
  },
  "dependencies": {
    "@agm/core": "^1.0.0-beta.1",
    "@agm/snazzy-info-window": "^1.0.0-beta.1",
    "@angular/animations": "^4.1.3",
    "@angular/common": "^4.1.3",
    "@angular/compiler": "^4.1.3",
    "@angular/compiler-cli": "^4.1.3",
    "@angular/core": "^4.3.2",
    "@angular/forms": "^4.1.3",
    "@angular/http": "^4.1.3",
    "@angular/platform-browser": "^4.1.3",
    "@angular/platform-browser-dynamic": "^4.1.3",
    "@angular/platform-server": "^4.1.3",
    "@angular/router": "^4.1.3",
    "angular2-materialize": "^15.1.10",
    "angular2-meteor": "^0.7.1",
    "angular2-meteor-polyfills": "0.1.1",
    "angular2-meteor-tests-polyfills": "0.0.2",
    "babel-runtime": "^6.18.0",
    "bcrypt": "^1.0.2",
    "core-js": "^2.5.1",
    "jquery": "^3.2.1",
    "meteor-rxjs": "0.4.7",
    "parse-jsonp": "^0.1.0",
    "reflect-metadata": "0.1.9",
    "rxjs": "5.0.2",
    "snazzy-info-window": "^1.1.0",
    "typescript": "^2.3.4",
    "zone.js": "^0.8.16"
  },
  "packages": {}
}
xtiannyeto commented 6 years ago

i think it's not material the problem but @agm/core": "^1.0.0-beta.1", remove it will work see https://github.com/SebastianM/angular-google-maps/issues/1058