Skip to content

Next.js: SyntaxError: Unexpected token 'export' #12

@proclamo

Description

@proclamo

Hello,

I'm trying to add a FlowmapLayer on an existing project which is already using Deck.gl.

I'm not an expert in nx + next.js configuration, but I've tried several things, even with next-transpile-modules (although I didn't know what I was doing).

I am working with a very simple example:

const layers = [
    new FlowmapLayer<LocationDatum, FlowDatum>({
        id: 'my-flowmap-layer',
        od_data,
        pickable: true,
    })
];

...

<div sx={{ width, height }}>
  <DeckGL
        width="100%"
        height="100%"
        controller={true}
        layers={layers}
      >
        <ReactMapGl
          mapStyle={BASEMAP.POSITRON}
          mapboxAccessToken={process.env.NEXT_PUBLIC_MAP}
      />
  </DeckGL>
</div>

and I get the error:

SyntaxError: Unexpected token 'export'

[...]/node_modules/ (flowmap.gl/layers/dist/index.js (1)

Any clue of how can I fix this?

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