Skip to content

Version 1.4.4 || Uncaught ReferenceError: jsVectorMap is not defined #69

@Mgrmjp

Description

@Mgrmjp

Barebones project and trying to use the package. Getting this in console:

Uncaught ReferenceError: jsVectorMap is not defined
    at Object.3r67O ((index):2496:1)
    at newRequire ((index):89:24)
    at localRequire ((index):101:14)
    at Object.5HwUs.lodash/range ((index):490:16)
    at newRequire ((index):89:24)
    at localRequire ((index):101:14)
    at Object.fUiC5../app.js ((index):480:14)
    at newRequire ((index):89:24)
    at (index):138:5
    at (index):161:3

3r67O @ (index):2496
newRequire @ (index):89
localRequire @ (index):101
5HwUs.lodash/range @ (index):490
newRequire @ (index):89
localRequire @ (index):101
fUiC5../app.js @ (index):480
newRequire @ (index):89
(anonymous) @ (index):138
(anonymous) @ (index):161

Downgrading to 1.3.3 worked, but what might be the problem?

Importing like so:

import 'jsvectormap';
import 'jsvectormap/dist/maps/world.js';

const map = new jsVectorMap({
  selector: '#map',
  map: 'world',
});

Installed via npm. Node version 14.19.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions