Skip to content
This repository was archived by the owner on Dec 19, 2023. It is now read-only.
This repository was archived by the owner on Dec 19, 2023. It is now read-only.

Flow error in node_modules #89

@jingsam

Description

@jingsam

I get this error when compile mapbox-gl-style-spec in node_modules:

Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: /Users/jingsam/projects/underreact-test/node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/interpolate.js: Unexpected token (10:12)

   8 | import { hcl, lab } from '../../util/color_spaces';
   9 | 
> 10 | import type { Stops } from '../stops';
     |             ^
  11 | import type { Expression } from '../expression';
  12 | import type ParsingContext from '../parsing_context';
  13 | import type EvaluationContext from '../evaluation_context';

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

here is my babel.config.js:

module.exports = {
  presets: ['@mapbox/babel-preset-mapbox', '@babel/preset-flow']
}

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