Error in GraphicsView2D when upgrading angular CLI app from esri 4.15 to 4.16.

348
0
08-06-2020 05:59 PM
EugeneStaten
New Contributor III

We have an Angular CLI 9.1 application with esri api for js 4.15.

We are using @arcgis/webpack-plugin and @types/arcgis-js-api.

Everything works fine this way.

I branched this solution and tried to upgrade the new branch with esri api for js 4.16.

After reading "What's New", I removed all declared() wrapper function from my subClass declarations.

After working through other errors, I have finally been stopped cold with this error.

core.js:4127 ERROR TypeError: this.requestUpdateCallback is not a function
at t.requestUpdate (GraphicsView2D.js:25)
at t.viewChange (GraphicsView2D.js:25)
at t.i.viewChange (GraphicsLayerView2D.js:25)
at e._updateLayerView (FrameTask.js:25)
at Array.forEach (<anonymous>)
at t.forEach (Collection.js:25)
at i.update (FrameTask.js:25)
at scheduling.js:25
at t.forEach (PooledArray.js:25)
at a (scheduling.js:25)

This is with @types/arcgis-js-api 4.16.0.

I don't get this error with @types/arcgis-js-api 4.15.0.

Any help would be appreciated.

Here is my tsconfig.json:

{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"strict": false,
"alwaysStrict": false,
"declaration": false,
"checkJs": false,
"downlevelIteration": true,
"experimentalDecorators": true,
"preserveConstEnums": true,
"module": "ESNext",
"importHelpers": true,
"allowSyntheticDefaultImports": true,
"noImplicitUseStrict": true,
"noImplicitAny": false,
"moduleResolution": "node",
"esModuleInterop": true,
"isolatedModules": false,
"target": "ES5",
"skipLibCheck": true,
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2015.promise",
"es5",
"es6",
"dom"
]
},
"angularCompilerOptions": {
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true
}
}

Here is the most important part of angular.json:

"root": "./",
"sourceRoot": "angularCLIsrc",
"prefix": "",
"architect": {
"build": {
"builder": "@angular-builders/custom-webpack:browser",
"options": {
"customWebpackConfig": {
"path": "./custom-build.js"
},
"rebaseRootRelativeCssUrls": true,
"outputPath": "dist/esri",
"index": "index.html",
"main": "angularCLIsrc/main.ts",
"polyfills": "angularCLIsrc/polyfills.ts",
"tsConfig": "tsconfig.app.json",

0 Kudos
0 Replies