mgechev / ngrev

Tool for reverse engineering of Angular applications
MIT License
1.58k stars 106 forks source link

Cannot load project - AOT Compatible #29

Closed OClement closed 6 years ago

OClement commented 6 years ago

Hi,

wanted to try this app with my project but I'm getting this error:

screen shot 2018-01-13 at 3 36 39 pm

Project is AOT compatible (buildable through --aot and ngc)

Deps:

"dependencies": {
    "@angular/animations": "^5.1.0",
    "@angular/common": "^5.1.0",
    "@angular/compiler": "^5.1.0",
    "@angular/core": "^5.1.0",
    "@angular/forms": "^5.1.0",
    "@angular/http": "^5.1.0",
    "@angular/platform-browser": "^5.1.0",
    "@angular/platform-browser-dynamic": "^5.1.0",
    "@angular/platform-server": "^5.1.0",
    "@angular/router": "^5.1.0",
    "@ngrx/core": "^1.2.0",
    "@ngrx/effects": "^4.1.1",
    "@ngrx/router-store": "^4.1.1",
    "@ngrx/store": "^4.1.1",
    "@ngrx/store-devtools": "^4.1.1",
    "core-js": "^2.4.1",
    "deep-diff": "0.3.4",
    "enhanced-resolve": "3.3.0",
    "enumerate-devices-shim": "^1.0.2",
    "get-user-media-promise": "^1.1.1",
    "howler": "^2.0.3",
    "immutable": "^3.8.1",
    "mv-api-js": "~0.0.0",
    "ngx-popover": "0.0.16",
    "ngx-smart-modal": "^3.1.0",
    "node-uuid": "^1.4.8",
    "normalize.css": "^7.0.0",
    "rxjs": "^5.5.5",
    "typescript-memoize": "^0.0.4",
    "web-animations-js": "^2.3.1",
    "webrtc-adapter": "3.3.4",
    "zone.js": "^0.8.4"
  },
  "devDependencies": {
    "@angular/cli": "^1.6.0",
    "@angular/compiler-cli": "^5.1.0",
    "@types/jasmine": "https://nexus.protmv.com/repository/npm-public/@types/jasmine/-/jasmine-2.5.38.tgz",
    "@types/node": "~6.0.60",
    "audiosprite": "^0.6.0",
    "babel-polyfill": "^6.26.0",
    "bootstrap": "4.0.0-alpha.6",
    "codelyzer": "~2.0.0",
    "ffbinaries": "^1.0.1",
    "intl": "^1.2.5",
    "jasmine-core": "2.5.2",
    "jasmine-spec-reporter": "~3.2.0",
    "karma": "~1.4.1",
    "karma-chrome-launcher": "^2.0.0",
    "karma-cli": "^1.0.1",
    "karma-coverage-istanbul-reporter": "^0.2.0",
    "karma-es6-shim": "^1.0.0",
    "karma-jasmine": "~1.1.0",
    "karma-jasmine-html-reporter": "^0.2.2",
    "karma-junit-reporter": "^1.2.0",
    "karma-phantomjs-launcher": "^1.0.2",
    "phantomjs-prebuilt": "^2.1.14",
    "postcss-grid-kiss": "^1.4.2",
    "protractor": "~5.1.0",
    "ts-helpers": "^1.1.1",
    "ts-node": "~2.0.0",
    "tslint": "~4.5.0",
    "typescript": "^2.6.2",
    "wallaby-webpack": "*",
    "webpack-bundle-analyzer": "^2.7.0"
  }
mgechev commented 6 years ago

Would you share your tsconfig.json?

mgechev commented 6 years ago

See https://github.com/mgechev/ngrev/issues/27

OClement commented 6 years ago

I've taken a look at #27 Not sure it relates to the issue I'm experiencing, at least based on the error I get I tried removing/changing the excludes properties but it didn't help

ts-config.json

{
  "compileOnSave": false,
  "baseUrl": "./",
  "compilerOptions": {
    "outDir": "./dist/out-tsc",
    "sourceMap": true,
    "declaration": false,
    "removeComments": true,
    "moduleResolution": "node",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "target": "es5",
    "lib": [
      "es2016",
      "dom"
    ],
    "typeRoots": [
      "./node_modules/@types"
    ]
  }
}

ts-config.app.json

{
  "extends": "../tsconfig.json",
  "compilerOptions": {
    "lib": [
      "es6",
      "es2016",
      "dom"
    ],
    "mapRoot": "./",
    "module": "es2015",
    "moduleResolution": "node",
    "outDir": "../dist/out-tsc/app",
    "sourceMap": true,
    "target": "es5"
  },
  "exclude": [
    "node_modules",
    "test.ts",
    "wallabyTest.js",
    "**/*.spec.ts"
  ]
}
mgechev commented 6 years ago

It will be helpful if you share a minimum example so I can reproduce the issue. Not sure if I can help otherwise :(

OClement commented 6 years ago

Hmm ok I’ll check if I manage to repel it in a simpler project when I have a « few » minutes

Thanks

Le 15 janv. 2018 à 18:43, Minko Gechev notifications@github.com a écrit :

It will be helpful if you share a minimum example so I can reproduce the issue. Not sure if I can help otherwise :(

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

OClement commented 6 years ago

@mgechev Hi there, Looks like the issue I'm experiencing is tied to the fact I have a lazy loaded module By removing lazy loading I could load the project properly

Is it something you're supposed to support already?

mgechev commented 6 years ago

Lazy loading modules are supported, here's an example.

OClement commented 6 years ago

Hmmm interesting

I must have something else in that module causing the issue Will try to isolate it and report back if/when I find it

Le 18 janv. 2018 à 12:37, Minko Gechev notifications@github.com a écrit :

Lazy loading modules are supported, here's an example.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

MichalMaM commented 6 years ago

@OClement see #33 you may have a similar problem

OClement commented 6 years ago

@MichalMaM Yep that's exactly it, thanks!

Good catch; I guess we can close this