Cannot read property 'extend' of undefined
See original GitHub issueI load these scripts in my head:
<script src="js/jquery.min.js" defer></script>
<script src="https://unpkg.com/leaflet@latest/dist/leaflet.js" defer></script>
<script src="https://unpkg.com/leaflet-control-geocoder@latest/dist/Control.Geocoder.js"></script>
<script src="js/siteworks.js" defer></script>
I create a map which is displayed correctly and when I add the geocoder L.Control.geocoder().addTo(map);
I get this error:
Uncaught TypeError: Cannot read property 'extend' of undefined at nominatim.js:5 at index.js:42
nominatim.js:
import L from 'leaflet';
import { template, getJSON } from '../util';
export default {
class: L.Class.extend({ <--
options: {
.
.
.
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (2 by maintainers)
Top Results From Across the Web
TypeError: Cannot read property 'extend' of undefined #61
Looks like super does not exist in Ctor (and Ctor is the Vue constructor function). I'm using Vue 2.5.2.
Read more >Uncaught TypeError: Cannot read properties of undefined ...
In vue 3 there's no exported member called Vue , the right code that's equivalent for Vue.extend is : import { defineComponent }...
Read more >Vue can not read property 'extend' of undefined from library ...
[Solved]-Vue can not read property 'extend' of undefined from library-Vue.js. Search. score:0. Try exporting it as a function that returns Vue.extend()
Read more >TypeError: Cannot read property 'extend' of undefined - Browser
?Hi @BLeahy - This typically occurs when one of the objects you are accessing in the Synthetic script is null or undefined. If...
Read more >Cannot read property 'extend' of undefined - Mobiscroll
Cannot read property 'extend' of undefined ... Hi there. We recently downloaded Calendar as component with ES6 modules. In the AppModule we ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This has nothing to do with the other scripts eg. siteworks. Even a minimal HTML that does nothing shows this error after load in Chrome console:
Result:
nominatim.js:5 Uncaught TypeError: Cannot read property ‘extend’ of undefined at nominatim.js:5 at index.js:42
Very unprofessional, what is the source of this problem??
@leonheess Yeah, sorry about closing it abruptly, but if you read my response, it says:
And I stand by the important part: without a reproducible, running example, it is usually impossible as a maintainer to find out what is happening. A few
<script>
tags and an error message is rarely enough, unless it’s a problem you have seen before.