Tgure/ngx-loggly-logger

Error using in Angular 4

Closed this issue · 6 comments

After upgrading to Angular 4, this error appeared while building.

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 /Users/mrobinson/Dropbox/Projects/JavaMaven/ms-quoting-system/node_modules/ngx-loggly-logger/node_modules/@angular/core/src/di/metadata.d.ts, resolving symbol OpaqueToken in /Users/mrobinson/Dropbox/Projects/JavaMaven/ms-quoting-system/node_modules/ngx-loggly-logger/node_modules/@angular/core/src/di/opaque_token.d.ts, resolving symbol OpaqueToken in /Users/mrobinson/Dropbox/Projects/JavaMaven/ms-quoting-system/node_modules/ngx-loggly-logger/node_modules/@angular/core/src/di/opaque_token.d.ts

FYI: part of our package.json
"dependencies": { "@angular/animations": "^4.0.0", "@angular/common": "^4.0.0", "@angular/compiler": "^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/router": "^4.0.0", "angular2-mdl": "^2.13.2", "angular2localization": "^1.4.2", "core-js": "^2.4.1", "dialog-polyfill": "^0.4.4", "ngx-loggly-logger": "0.0.21", "primeng": "^4.0.0-rc.1", "rxjs": "^5.1.0", "zone.js": "^0.8.4" }, "devDependencies": { "@angular/cli": "1.0.0", "@angular/compiler-cli": "^4.0.0", "@angular/language-service": "^4.0.0", "@types/jasmine": "2.5.38", "@types/jquery": "^2.0.32", "@types/node": "~6.0.60", "codelyzer": "~2.0.0", "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-jasmine": "~1.1.0", "karma-jasmine-html-reporter": "^0.2.2", "protractor": "~5.1.0", "ts-node": "~2.0.0", "tslint": "~4.5.0", "typescript": "~2.2.0" }

Tgure commented

@mike-robinson I have not updated any of my projects to 4 yet. I will try and take a look at this as soon as I get a chance.

Thanks. I'll look into more detail regarding our build process. We do not get the error when building for development, just production.

Tgure commented

@mike-robinson I bumped the dependencies if you want to try and see if maybe it was a dependency clash, npm install ngx-loggly-logger@0.0.22 . I did not test it out, so if you try it let me know. Thanks

@Tgure Thanks. I tried the update. Honestly, not sure of the dependency messages but the result was the same. Again, the non production build does not product the error.

**development:ms-quoting-system mrobinson$ sudo nstall ngx-loggly-logger@0.0.22
Password:

  • rxjs@5.1.1 node_modules/ngx-loggly-logger/node_modules/rxjs
  • zone.js@0.7.8 node_modules/ngx-loggly-logger/node_modules/zone.js
    ms-quoting-system@1.0.0 /Users/mrobinson/Dropbox/Projects/JavaMaven/ms-quoting-system
    ├── UNMET PEER DEPENDENCY @angular/common@4.0.0
    ├── UNMET PEER DEPENDENCY @angular/core@4.0.0
    ├── UNMET PEER DEPENDENCY @angular/forms@4.0.0
    ├── UNMET PEER DEPENDENCY @angular/http@4.0.0
    └─┬ ngx-loggly-logger@0.0.22 invalid
    ├── @angular/common@4.0.1
    ├── @angular/core@4.0.1
    ├── @angular/http@4.0.1
    ├── @angular/platform-browser@4.0.1
    └── ng2-cookies@1.0.10

npm WARN angular2-mdl@2.13.2 requires a peer of @angular/core@^2.0.2 but none was installed.
npm WARN angular2-mdl@2.13.2 requires a peer of @angular/common@^2.0.2 but none was installed.
npm WARN angular2-mdl@2.13.2 requires a peer of @angular/forms@^2.0.2 but none was installed.
npm WARN angular2localization@1.4.2 requires a peer of @angular/common@^2.4.0 but none was installed.
npm WARN angular2localization@1.4.2 requires a peer of @angular/core@^2.4.0 but none was installed.
npm WARN angular2localization@1.4.2 requires a peer of @angular/forms@^2.4.0 but none was installed.
npm WARN angular2localization@1.4.2 requires a peer of @angular/http@^2.4.0 but none was installed.
development:ms-quoting-system mrobinson$ ng build --prod
Hash: a5e7a64c84ef4bd42eee
Time: 9467ms
chunk {0} polyfills.2bfbe6e93f8566470fd2.bundle.js (polyfills) 233 kB {4} [initial] [rendered]
chunk {1} styles.f36b3950365ba5f3848e.bundle.css (styles) 175 bytes {4} [initial] [rendered]
chunk {2} main.13e6ffaeb1f7c0bd6d22.bundle.js (main) 844 bytes {3} [initial] [rendered]
chunk {3} vendor.cda42a1e9aeb93f82682.bundle.js (vendor) 805 kB [initial] [rendered]
chunk {4} inline.952451b26faa3f9762cd.bundle.js (inline) 0 bytes [entry] [rendered]

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 /Users/mrobinson/Dropbox/Projects/JavaMaven/ms-quoting-system/node_modules/ngx-loggly-logger/node_modules/@angular/core/core.d.ts, resolving symbol ɵf in /Users/mrobinson/Dropbox/Projects/JavaMaven/ms-quoting-system/node_modules/ngx-loggly-logger/node_modules/@angular/core/core.d.ts, resolving symbol ɵf in /Users/mrobinson/Dropbox/Projects/JavaMaven/ms-quoting-system/node_modules/ngx-loggly-logger/node_modules/@angular/core/core.d.ts

ERROR in ./src/main.ts
Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in '/Users/mrobinson/Dropbox/Projects/JavaMaven/ms-quoting-system/src'
@ ./src/main.ts 4:0-74
@ multi ./src/main.ts**

Tgure commented

@mike-robinson try ngx-loggly-logger@0.0.27 check the readme for a change on the imports. I was able to get this one to work using angular-cli ng build --prod on using angular 4. Let me know if you have any luck with it.

@Tgure Thanks, Aaron. That did the trick.