keplergl/kepler.gl

[Bug]Examples Run Error: "ERROR in ./node_modules/@loaders.gl/gis/node_modules/@math.gl/core/dist/index.js 13:9"

aikjun opened this issue · 1 comments

ERROR in ./node_modules/@loaders.gl/gis/node_modules/@math.gl/core/dist/index.js 13:9
Module parse failed: Unexpected token (13:9)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| export { Pose } from "./classes/pose.js";
| export { Euler } from "./classes/euler.js";

export * as _MathUtils from "./lib/math-utils.js";
| // lib
| export { assert } from "./lib/assert.js";
@ ./node_modules/@loaders.gl/gis/node_modules/@math.gl/polygon/dist/polygon.js 2:0-40 7:28-35
@ ./node_modules/@loaders.gl/gis/node_modules/@math.gl/polygon/dist/index.js
@ ./node_modules/@loaders.gl/gis/dist/lib/binary-features/geojson-to-flat-geojson.js
@ ./node_modules/@loaders.gl/gis/dist/index.js
@ ./node_modules/@loaders.gl/arrow/dist/tables/convert-arrow-to-geojson-table.js
@ ./node_modules/@loaders.gl/arrow/dist/index.js
@ ./node_modules/@kepler.gl/layers/dist/layer-utils.js
@ ./node_modules/@kepler.gl/layers/dist/point-layer/point-layer.js
@ ./node_modules/@kepler.gl/layers/dist/index.js
@ ./node_modules/@kepler.gl/components/dist/editor/editor.js
@ ./node_modules/@kepler.gl/components/dist/index.js
@ ./src/components/fresh-map.js
@ ./src/app.js
@ ./src/main.js

Looks like your build environment doesn't support ESM modules (From your report above, I assume it fails to parse export syntax). There are different options, modernize your build environment, precompile your node modules etc.