Hey all,
Another brick wall appears in front of me so soon since my first one!
I've managed to translate all my code into ES6 using ViteJS which solved my module bundler issues that we're causing my last problem.
However I've now run into a issue when using the EditorWidget within my web map application(which worked when using CDN).
I'm loading the Editor Widget with the following simple code:
let editor = new Editor({
view: mapview
})
mapview.ui.add(editor, {
position: "top-right"
});The Widget is able to load and provides me with the normal Widget Panel (I've done no changes to the Widget itself, I'm just literally calling the Widget for the single layer from my local Portal).
I'm able to Edit via the Widget and Save/Apply the edits successfully - the issue occurs when I try and Insert a new feature where I get the following error:
Uncaught TypeError: Cannot destructure property 'objectIdField' of 't15' as it is null.
at p10._getLabel (@arcgis_core_widgets_Editor.js?v=fd72f127:3971)
The insert does commit and is saved to the Portal correctly, but the above error causes the Widget to freeze and nothing else can be done.
I fear this is likely beyond my comprehension as its within the Widget - but I also wonder if its the module bundler doing something? As I mentioned in my last post - I have no real experience with module bundlers. After attempting to naively work out where the error may be coming from - I've had a look in the corresponding file that I think the error is generated from (WorkFlow.js)? But I'm not too sure!
Be disappointing if the app gets to the literal final hurdle and dies!
I'm not really sure what else I can share but here is my package.json file if it helps:
{
"name": "small-map-editor",
"version": "0.0.0",
"scripts": {
"dev": "vite --host",
"build": "vite build",
"serve": "vite preview"
},
"devDependencies": {
"vite": "^2.6.4"
},
"dependencies": {
"@arcgis/core": "^4.21.2",
"jquery": "^3.6.0"
}
}Any chance someone could put me out of my misery again?