angular / angularfire

Angular + Firebase = ❤️
https://firebaseopensource.com/projects/angular/angularfire2
MIT License
7.67k stars 2.19k forks source link

ERROR in Error encountered resolving symbol values statically. Calling function 'makeDecorator', ... #1000

Closed b-area closed 7 years ago

b-area commented 7 years ago

We are currently using the "angularfire2": "^2.0.0-beta.8" with our production. We haven't changed anything on our repo, but it looks like when we do a fresh npm install, it won't compile anymore. We have tried to update to the most recent version of angularfire2, it compiles fine, but it won't run on any browser.

This is an angular-cli project using the AOT

Error

ERROR in Error encountered resolving symbol values statically. Calling function 'makeDecorator', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol Injectable in /user/projects/test/tike-frontend-aot/node_modules/angularfire2/node_modules/@angular/core/src/di/metadata.d.ts, resolving symbol Injectable in /user/projects/test/tike-frontend-aot/node_modules/angularfire2/node_modules/@angular/core/src/di.d.ts, resolving symbol Injectable in /user/projects/test/tike-frontend-aot/node_modules/angularfire2/node_modules/@angular/core/src/core.d.ts, resolving symbol Injectable in /user/projects/test/tike-frontend-aot/node_modules/angularfire2/node_modules/@angular/core/index.d.ts, resolving symbol AngularFireAuth in /user/projects/test/tike-frontend-aot/node_modules/angularfire2/auth/auth.d.ts, resolving symbol AngularFireAuth in /user/projects/test/tike-frontend-aot/node_modules/angularfire2/auth/auth.d.ts

ERROR in ./src/main.ts Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in '/users/project/test/tike-frontend-aot/src' @ ./src/main.ts 5:0-74 @ multi ./src/main.ts

package.json

{
  "name": "playing-ng2-aot",
  "version": "0.0.0",
  "license": "MIT",
  "angular-cli": {},
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "lint": "tslint \"src/**/*.ts\"",
    "test": "ng test",
    "pree2e": "webdriver-manager update --standalone false --gecko false",
    "e2e": "protractor",
    "build:prod": "rm -r -f dist && ng build --prod --aot --stats-json",
    "serve:prod": "ng serve --prod --aot",
    "bundle-report": "webpack-bundle-analyzer dist/stats.json"
  },
  "private": true,
  "dependencies": {
    "@agm/core": "^1.0.0-beta.0",
    "@angular/animations": "^4.0.0",
    "@angular/common": "^4.0.0",
    "@angular/compiler": "^4.0.0",
    "@angular/compiler-cli": "^4.0.0",
    "@angular/core": "^4.0.0",
    "@angular/forms": "^4.0.0",
    "@angular/http": "^4.0.0",
    "@angular/platform-browser": "^4.0.0",
    "@angular/platform-browser-dynamic": "^4.0.0",
    "@angular/platform-server": "^4.0.0",
    "@angular/router": "^4.0.0",
    "angular2-qrcode": "^1.0.5",
    "angularfire2": "^2.0.0-beta.8",
    "bootstrap": "^3.3.7",
    "core-js": "^2.4.1",
    "firebase": "^3.8.0",
    "font-awesome": "^4.7.0",
    "jquery": "^3.1.1",
    "ng2-bootstrap": "^1.1.16-11",
    "ng2-file-upload": "^1.2.0",
    "ngx-pagination": "^3.0.0",
    "rxjs": "^5.0.1",
    "socket.io-client": "^2.0.1",
    "ts-helpers": "^1.1.1",
    "typescript": "^2.2.1",
    "zone.js": "^0.8.5"
  },
  "devDependencies": {
    "@angular/cli": "^1.0.0-rc.0",
    "@angular/compiler-cli": "^4.0.2",
    "@types/jasmine": "2.5.47",
    "@types/node": "^6.0.42",
    "codelyzer": "~2.1.1",
    "jasmine-core": "2.5.2",
    "jasmine-spec-reporter": "4.0.0",
    "karma": "1.6.0",
    "karma-chrome-launcher": "^2.0.0",
    "karma-cli": "^1.0.1",
    "karma-jasmine": "^1.0.2",
    "karma-remap-istanbul": "^0.6.0",
    "protractor": "~5.1.1",
    "ts-node": "3.0.2",
    "tslint": "^5.1.0",
    "typescript": "~2.2.2",
    "webpack-bundle-analyzer": "^2.4.0"
  }
}
markgoho commented 7 years ago

@b-area I think probably the suggestion will be to upgrade to the 4.0.0-rc before any troubleshooting can be done. The 2.0.0 beta versions are not compatible with Angular v4+.

larssn commented 7 years ago

What mark said. I had the same problem initially.

Just upgrade AF2 to v4rc0 and the problem will go away.

b-area commented 7 years ago

We will try to upgrade. Thank you.

jamesdaniels commented 7 years ago

Reopen if you have troubles with the rc