You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Base.js:101 Uncaught ReferenceError: Cannot access '__WEBPACK_DEFAULT_EXPORT__' before initialization
at Module.default (Base.js:101)
at Module../node_modules/ol-ext/util/input/Radio.js (Radio.js:20)
at __webpack_require__ (bootstrap:19)
at Module../node_modules/ol-ext/util/element.js (color.js:169)
at __webpack_require__ (bootstrap:19)
at Module../node_modules/ol-ext/util/input/Checkbox.js (Base.js:101)
at __webpack_require__ (bootstrap:19)
at Module../node_modules/ol-ext/util/input/Switch.js (Slider.js:104)
at __webpack_require__ (bootstrap:19)
at Object../examples/misc/map.input.ts (map.input.ts:1)
I confirmed that the following temporal dependencies deletion (just comment out) solved types-ol-ext side's above Uncaught ReferenceError, so I think that this circular dependencies issue needs to be solved at ol-ext side.
--- a/src/util/element.js+++ b/src/util/element.js@@ -3,9 +3,9 @@
* @see https://plainjs.com/javascript/
* @see http://youmightnotneedjquery.com/
*/
-import ol_ext_input_Checkbox from './input/Checkbox'-import ol_ext_input_Switch from './input/Switch'-import ol_ext_input_Radio from './input/Radio'+// import ol_ext_input_Checkbox from './input/Checkbox'+// import ol_ext_input_Switch from './input/Switch'+// import ol_ext_input_Radio from './input/Radio'
/** @namespace ol.ext.element */
var ol_ext_element = {};
@@ -105,7 +105,7 @@ ol_ext_element.createSwitch = function (options) {
parent: options.parent
});
var opt = Object.assign ({ input: input }, options || {});
- new ol_ext_input_Switch(opt);+ // new ol_ext_input_Switch(opt);
return input;
};
@@ -130,11 +130,11 @@ ol_ext_element.createCheck = function (options) {
});
console.log(input)
var opt = Object.assign ({ input: input }, options || {});
- if (options.type === 'radio') {- new ol_ext_input_Radio(opt);- } else {- new ol_ext_input_Checkbox(opt);- }+ // if (options.type === 'radio') {+ // new ol_ext_input_Radio(opt);+ // } else {+ // new ol_ext_input_Checkbox(opt);+ // }
return input;
};
The text was updated successfully, but these errors were encountered:
About
/examples/misc/map.input.html
example, it works without problem onol-ext
examples (https://viglino.github.io/ol-ext/examples/misc/map.input.html), but ontypes-ol-ext
porting (Siedlerchr/types-ol-ext#61), I encountered the following error.From googling the error message, the cause seems to be circular dependencies,
https://stackoverflow.com/questions/65038253/uncaught-referenceerror-cannot-access-webpack-default-export-before-initi
and I actually found that the following circular dependencies.
src/util/input/Base.js
requiressrc/util/element.js
:src/util/element.js
requiressrc/util/input/(Checkbox|Radio|Switch).js
:src/util/input/(Checkbox|Radio|Switch).js
requiressrc/util/element.js
andsrc/util/input/Base.js
:I confirmed that the following temporal dependencies deletion (just comment out) solved
types-ol-ext
side's aboveUncaught ReferenceError
, so I think that this circular dependencies issue needs to be solved atol-ext
side.The text was updated successfully, but these errors were encountered: