Error while building the project with Deck.gl package

157 Views Asked by At

Does anybody know how to fix the problem, that occures in the console while i am trying to build the project?

Error:

export * from './exports-mapbox';
^^^^^^

SyntaxError: Unexpected token 'export'

MapComponents imports

import MapGL from 'react-map-gl/dist/esm';
import dynamic from "next/dynamic";
const DeckGL = dynamic(() => import("deck.gl"), {ssr: false})
import {
  GeoJsonLayer,
  PathLayer,
  SolidPolygonLayer,
  PolygonLayer,
  IconLayer
} from '@deck.gl/layers/dist/esm';

index.js

import dynamic from 'next/dynamic';

const SRMap = dynamic(() => import('../pages/map/Map'), { ssr: false });

export default Map = () => {
  return (
    <SRMap />
  )
}

I have tried to add "type": "module" to a package.json file. But it doesn't work.

0

There are 0 best solutions below