mobxjs / mobx-angular

The MobX connector for Angular.
MIT License
483 stars 59 forks source link

ERROR in Ng2MobxModule is not an NgModule #11

Closed janaagaard75 closed 7 years ago

janaagaard75 commented 7 years ago

After upgrading all the packages in the TodoMVC example I get the error ERROR in Ng2MobxModule is not an NgModule when starting the application. As far as I can tell the most common solution to this issue is to downgrade from TypeScript 2.1 to 2.0, but that doesn't fix this issue.

Here are the versions of the packages that I am using:

"dependencies": {
  "@angular/common": "2.4.4",
  "@angular/compiler": "2.4.4",
  "@angular/core": "2.4.4",
  "@angular/forms": "2.4.4",
  "@angular/http": "2.4.4",
  "@angular/platform-browser": "2.4.4",
  "@angular/platform-browser-dynamic": "2.4.4",
  "@angular/router": "3.4.4",
  "core-js": "2.4.1",
  "mobx": "3.0.2",
  "ng2-mobx": "1.2.2",
  "rxjs": "5.0.3",
  "todomvc-app-css": "2.0.6",
  "todomvc-common": "1.0.3",
  "ts-helpers": "1.1.2",
  "zone.js": "0.7.6"
},
"devDependencies": {
  "@angular/compiler-cli": "2.4.4",
  "@types/jasmine": "2.5.41",
  "@types/node": "7.0.4",
  "angular-cli": "1.0.0-beta.26",
  "codelyzer": "2.0.0-beta.4",
  "jasmine-core": "2.5.2",
  "jasmine-spec-reporter": "3.2.0",
  "karma": "1.4.0",
  "karma-chrome-launcher": "2.0.0",
  "karma-cli": "1.0.1",
  "karma-jasmine": "1.1.0",
  "karma-remap-istanbul": "0.4.0",
  "protractor": "5.0.0",
  "ts-node": "2.0.0",
  "tslint": "4.3.1",
  "typescript": "2.0.10",
  "webdriver-manager": "11.1.1"
}
adamkleingit commented 7 years ago

Hey, I can't reproduce. Using the above package json I'm actually getting a different warning but it works

janaagaard75 commented 7 years ago

Sorry for not clarifying this in the first message: It works, except the warning/error prevents auto-reloading the site.

The whole repo is here. I'm using Yarn to install the packages, so I guess that should help making the error reproducible. I've switched back to TypeScript 2.1 since downgrading didn't work, and I might also have added a two peer dependencies that some package was complaining about.

https://github.com/janaagaard75/framework-investigations/tree/master/ng2-mobx-todomvc

(I hope it's okay that I copied the original files. Not too sure about how to handle these open source things correctly.)

janaagaard75 commented 7 years ago

Quick update: Upgrading the packages to the latest versions, mainly Angular bumped to v2.4.5, did not fix the issue.

adamkleingit commented 7 years ago

Fixed in 1.2.3. Please verify

janaagaard75 commented 7 years ago

Updated all the packages, and can confirm that error is gone now. 👍

adamkleingit commented 7 years ago

Awesome