cstefanache / angular2-img-cropper

Angular 2 Image Cropper
MIT License
364 stars 135 forks source link

Error when selecting file #12

Closed davidbonachera closed 8 years ago

davidbonachera commented 8 years ago

I have this error when i select a file on my html page.

`zone.js:260 Uncaught EXCEPTION: Error in ./ImageCropperComponent class ImageCropperComponent - inline template:2:25 ORIGINAL EXCEPTION: RangeError: Maximum call stack size exceeded ORIGINAL STACKTRACE:

browser_adapter.js:77 RangeError: Maximum call stack size exceeded at get (zone.js:966) at get (zone.js:966) at get (zone.js:966) at get (zone.js:966) at get (zone.js:966) at get (zone.js:966) at get (zone.js:966) at get (zone.js:966) at get (zone.js:966) at get (zone.js:966) ` Don't understand where it comes from. I use ZoneJs but i don't see where the loop on get come from.

cstefanache commented 8 years ago

Hello,

I do not seem to find where the issue is triggered. here is a working plunker: https://embed.plnkr.co/V91mKCNkBQZB5QO2MUP4/

davidbonachera commented 8 years ago

Hum weird,it may be a problem related to the angular2-meteor-bootstrap wrapper i'm using so, because i have the same setup as your plunkr. I'm looking into this.

cstefanache commented 8 years ago

If you can reproduce it on a plnkr fork I can have a look into it

Mihai-B commented 8 years ago

what version of angular are you using? And what version of zone.js are you using?

davidbonachera commented 8 years ago

This is my package.json, i'll try to post a plunkr this week-end.

{
  "name": "beacon-cms",
  "private": true,
  "scripts": {
    "start": "meteor run"
  },
  "dependencies": {
    "@angular/common": "^2.0.0-rc.1",
    "@angular/compiler": "^2.0.0-rc.1",
    "@angular/core": "^2.0.0-rc.1",
    "@angular/http": "^2.0.0-rc.1",
    "@angular/platform-browser": "^2.0.0-rc.1",
    "@angular/platform-browser-dynamic": "^2.0.0-rc.1",
    "@angular/router-deprecated": "^2.0.0-rc.1",
    "angular2-fontawesome": ">=0.3.0",
    "angular2-google-maps": "^0.10.0",
    "angular2-locker": "^0.3.0",
    "angular2-meteor": "^0.5.5",
    "angular2-meteor-accounts-ui": "^0.4.3",
    "angular2-meteor-auto-bootstrap": "^0.5.5",
    "bootstrap": "^4.0.0-alpha.2",
    "es6-shim": "^0.35.1",
    "h5webstorage": "^0.4.2",
    "jquery": "^2.2.4",
    "meteor-node-stubs": "^0.2.3",
    "ng2-bootstrap": "^1.0.17",
    "ng2-datetime": "^1.0.3",
    "reflect-metadata": "^0.1.2",
    "rxjs": "^5.0.0-beta.6",
    "tether": "^1.3.2",
    "zone.js": "^0.6.12"
  },
  "devDependencies": {
    "codelyzer": "0.0.19"
  }
}
cstefanache commented 8 years ago

How do you load angular/cropper files? Do you use system.js or bundle in a single file? Can you paste system.config file content?

davidbonachera commented 8 years ago

I use commonjs.

This is my tsconfig.json :

{
  "compilerOptions": {
    "experimentalDecorators": true,
    "module": "commonjs",
    "target": "es5",
    "isolatedModules": false,
    "moduleResolution": "node",
    "emitDecoratorMetadata": true,
    "removeComments": true,
    "noImplicitAny": false,
    "sourceMap": true
  },
  "filesGlob": [
    "client/**/*.ts",
    "server/**/*.ts",
    "typings/**/*.d.ts"
  ]
}
davidbonachera commented 8 years ago

After some upgrades of my core and using the new angular router the problem, it's solved. It came from the compatibility between my meteor packages and my angular application.

cstefanache commented 8 years ago

Awesome! Closing issue...