Problem with AOT
I get an typing error with missing ClientMap when I am compiling via AOT (since I updated from angular2-apollo to apollo-angular).
ERROR in [at-loader] ./compiled/node_modules/apollo-angular/build/src/Apollo.ngsummary.ts:19:86 TS2339: Property 'ClientMap' does not exist on type 'typeof "node_modules/apollo-angular/build/src/types"'.
Could you provide me, some workarounds ?
My Webpack config is the same like in the angular-class bootstrap code.
Cheers, Christoph
I also found this, how to resolve it?
Currently, I don't have a solution :( I've upgraded all dependencies but still the same error with ClientMap does not exist on type typeof "/node_modules/apollo-angular/build/src/types"'." None AOT Compilation works like a charm.
This is killing AOT for me, too.
@kamilkisiela could you give it a try ? Would be awesome to have a valid AOT build ^^
@Uter1007 I will try to find some time today
I build using aot and don't get this error, weird.
can you show your setup ? angularclass is using ngc-webpack. + could you show us your tsconfig ? maybe thats the problem....
Using typical app generated using Angular CLI. The only thing I changed was adding "esnext.asynciterable" to the "libs" array in tsconfig, this is related to an issue with this library or apollo client, I forgot which one.
ok I believe the relies on the ngc-webpack (wrapper for angular-cli) package. could you provide your package.json ?
Sure.
{
"version": "0.0.1",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve --proxy-config proxy.conf.json",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "4.4.0-RC.0",
"@angular/cdk": "angular/cdk-builds",
"@angular/cli": "^1.4.1",
"@angular/common": "4.4.0-RC.0",
"@angular/compiler": "4.4.0-RC.0",
"@angular/compiler-cli": "4.4.0-RC.0",
"@angular/core": "4.4.0-RC.0",
"@angular/flex-layout": "angular/flex-layout-builds",
"@angular/forms": "4.4.0-RC.0",
"@angular/http": "4.4.0-RC.0",
"@angular/material": "angular/material2-builds",
"@angular/platform-browser": "4.4.0-RC.0",
"@angular/platform-browser-dynamic": "4.4.0-RC.0",
"@angular/platform-server": "4.4.0-RC.0",
"@angular/router": "4.4.0-RC.0",
"@ng2-dynamic-forms/core": "^1.4.18",
"@ng2-dynamic-forms/ui-material": "^1.4.18",
"apollo-angular": "0.13.0",
"apollo-client": "^1.9.1",
"apollo-client-rxjs": "0.6.0-rc.1",
"auth0-js": "^8.9.3",
"core-js": "^2.4.1",
"font-awesome": "^4.6.3",
"hammerjs": "^2.0.8",
"lodash": "^4.17.4",
"rxjs": "^5.4.2",
"source-map-loader": "^0.2.0",
"ts-helpers": "^1.1.1",
"zone.js": "^0.8.14"
},
"devDependencies": {
"@angular/compiler-cli": "4.4.0-RC.0",
"@angular/language-service": "4.4.0-RC.0",
"@types/faker": "^4.1.0",
"@types/graphql": "^0.10.2",
"@types/hammerjs": "^2.0.33",
"@types/jasmine": "2.5.53",
"@types/jasminewd2": "~2.0.2",
"@types/lodash": "^4.14.74",
"@types/node": "^6.0.60",
"apollo-codegen": "^0.17.0-alpha.1",
"apollo-test-utils": "^0.3.2",
"codelyzer": "~3.1.1",
"faker": "^4.1.0",
"graphql-tools": "^1.1.0",
"jasmine-core": "~2.6.2",
"jasmine-spec-reporter": "~4.1.0",
"karma": "~1.7.0",
"karma-chrome-launcher": "~2.1.1",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.1.2",
"ts-node": "~3.2.0",
"tslint": "~5.3.2",
"typescript": "~2.4.1"
}
}
btw, 0.13.1 of this library also works.
+1 I am having this same issue on AOT builds. Using OSX.
ERROR: dist/tmp/node_modules/apollo-angular/build/src/Apollo.ngsummary.ts(19,86): error TS2339: Property 'ClientMap' does not exist on type 'typeof "/Users/tbright/Downloads/angular-seed-advanced-master/node_modules/apollo-angular/build/s...'.
PACKAGE.JSON "devDependencies": { "@angular/compiler-cli": "^4.4.3", "@angular/platform-server": "^4.4.3", "@compodoc/compodoc": "^1.0.0-beta.7", "@ngrx/store-devtools": "^3.2.4", "@types/async": "^2.0.42", "@types/browser-sync": "^0.0.34", "@types/express": "^4.0.33", "@types/graphql": "^0.10.2", "@types/gulp": "^4.0.0", "@types/gulp-filter": "^3.0.29", "@types/gulp-htmlmin": "^1.3.30", "@types/gulp-load-plugins": "^0.0.29", "@types/gulp-newer": "0.0.29", "@types/gulp-protractor": "^1.0.29", "@types/gulp-rename": "0.0.31", "@types/gulp-sass": "^0.0.30", "@types/gulp-util": "^3.0.29", "@types/hammerjs": "^2.0.34", "@types/isomorphic-fetch": "0.0.34", "@types/jasmine": "2.5.41", "@types/lodash": "^4.14.63", "@types/node": "^6.0.73", "@types/rimraf": "0.0.28", "@types/run-sequence": "^0.0.29", "@types/selenium-webdriver": "^3.0.3", "@types/systemjs": "^0.19.31", "@types/yargs": "^6.5.0", "@types/zone.js": "^0.5.12", "async": "^2.1.1", "autoprefixer": "^7.0.1", "browser-sync": "^2.17.3", "codelyzer": "^3.0.0", "concurrently": "^3.4.0", "connect-history-api-fallback": "^1.3.0", "cssnano": "^3.7.7", "deep-extend": "^0.4.1", "electron-connect": "^0.4.2", "electron-debug": "^1.0.0", "electron-prebuilt": "^1.2.1", "event-stream": "^3.3.4", "express": "~4.15.2", "express-history-api-fallback": "^2.0.0", "graphql-anywhere": "^2.2.0", "graphql-tag": "^1.3.2", "gulp": "^3.9.1", "gulp-atom-electron": "^1.6.1", "gulp-cached": "^1.1.0", "gulp-concat": "^2.6.0", "gulp-concat-css": "^2.3.0", "gulp-filter": "^5.0.0", "gulp-htmlmin": "^3.0.0", "gulp-inject": "^4.1.0", "gulp-inline-ng2-template": "^4.0.0", "gulp-load-plugins": "^1.3.0", "gulp-newer": "^1.3.0", "gulp-plumber": "~1.1.0", "gulp-postcss": "^7.0.0", "gulp-progeny": "^0.4.0", "gulp-protractor": "^3.0.0", "gulp-rename": "^1.2.2", "gulp-replace": "^0.5.4", "gulp-sass": "^3.0.0", "gulp-sourcemaps": "2.6.0", "gulp-template": "^4.0.0", "gulp-tslint": "^8.0.0", "gulp-typescript": "^3.0.2", "gulp-uglify": "^2.0.0", "gulp-util": "^3.0.7", "gulp-watch": "^4.3.10", "hammerjs": "^2.0.8", "is-ci": "^1.0.9", "isstream": "^0.1.2", "jasmine-core": "~2.6.1", "jasmine-spec-reporter": "^4.1.0", "karma": "~1.3.0", "karma-chrome-launcher": "~2.1.1", "karma-coverage": "^1.1.1", "karma-jasmine": "~1.1.0", "karma-mocha-reporter": "^2.2.0", "karma-remap-istanbul": "^0.6.0", "merge-stream": "^1.0.0", "minimatch": "^3.0.3", "mkdirp": "^0.5.1", "ngrx-store-freeze": "^0.1.6", "open": "0.0.5", "protractor": "^4.0.14", "redux": "^3.7.2", "remap-istanbul": "^0.9.5", "rimraf": "^2.5.4", "rollup": "^0.41.4", "rollup-plugin-commonjs": "^8.0.2", "rollup-plugin-includepaths": "0.2.2", "rollup-plugin-node-resolve": "^3.0.0", "run-sequence": "^1.2.2", "semver": "^5.3.0", "serve-static": "^1.11.1", "slash": "~1.0.0", "supports-color": "^3.1.2", "systemjs-builder": "0.15.34", "tildify": "^1.2.0", "traceur": "^0.0.111", "ts-node": "^3.0.4", "tslint": "^5.0.0", "typed-graphql": "^1.0.2", "typedoc": "^0.6.0", "typescript": "^2.3.0", "walk": "^2.3.9", "yargs": "^8.0.1" }, "dependencies": { "@angular/animations": "^4.4.3", "@angular/cdk": "^2.0.0-beta.8", "@angular/common": "^4.4.3", "@angular/compiler": "^4.4.3", "@angular/core": "^4.4.3", "@angular/flex-layout": "^2.0.0-beta.9", "@angular/forms": "^4.4.3", "@angular/http": "^4.4.3", "@angular/material": "^2.0.0-beta.8", "@angular/platform-browser": "^4.4.3", "@angular/platform-browser-dynamic": "^4.4.3", "@angular/router": "^4.4.3", "@angular/service-worker": "~1.0.0-beta.13", "@ngrx/core": "^1.2.0", "@ngrx/effects": "^2.0.4", "@ngrx/router-store": "^1.2.5", "@ngrx/store": "^2.2.2", "@ngx-translate/core": "~7.0.0", "@ngx-translate/http-loader": "0.1.0", "angulartics2": "^2.2.1", "apollo-angular": "^0.13.0", "apollo-client": "^0.10.1", "apollo-client-rxjs": "^0.6.0-rc.1", "core-js": "^2.4.1", "es-module-loader": "^1.0.0", "fine-uploader": "^5.15.0", "graphql": "^0.11.2", "intl": "^1.2.5", "lodash": "^4.17.4", "minimatch": "^3.0.3", "ng2-toastr": "^4.1.2", "reflect-metadata": "^0.1.8", "rxjs": "^5.4.2", "systemjs": "0.19.41", "zone.js": "^0.8.7" }
@kamilkisilea any update on your investigations? Cheers.
@Uter1007 Fix will be released after the weekend.
Any news on this getting released?
When will this change be added to the npm apollo-angular? Will it be 13.2?
@kamilkisiela : any plans for new release ?
Expect it to be done in a day or two. Somehow I don't have access to this repository which I'm trying to solve.
I asked @Urigo to publish recent changes as v0.13.2
@kamilkisiela: Thank you! Looking forward to it!
just published 0.13.2
Many thanks, this did solve the issue and AOT works as it should. Just a note in case anyone needs it. You will need [email protected] at a minimum.
-cheers