Skip to content

Can't import module #14

@JeroenDelcour

Description

@JeroenDelcour

Installing the module from npm and importing it gives the following error:

vm.js:94 Uncaught /node_modules/@windfish-studio/three-map-controls/src/three-map-controls.js:5
import {
^^^^^^

SyntaxError: Cannot use import statement outside a module
    at new Script (vm.js:86:7)
    at createScript (vm.js:268:10)
    at Object.runInThisContext (vm.js:316:10)
    at Module._compile (internal/modules/cjs/loader.js:805:26)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:892:10)
    at Module.load (internal/modules/cjs/loader.js:735:32)
    at Module._load (internal/modules/cjs/loader.js:648:12)
    at Module._load (electron/js2c/asar.js:717:26)
    at Function.Module._load (electron/js2c/asar.js:717:26)
    at Module.require (internal/modules/cjs/loader.js:775:19)

Am I doing something wrong? I tried downgrading to 1.0.1 but it gave the same error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions