[OpenLayers-Users] Unable to complete part of the openlayers workshop

Andreas Hocevar andreas.hocevar at gmail.com
Wed Sep 26 03:23:23 PDT 2018


Hi,

please use the latest version of ol-mapbox-style instead of
ol-mapbox-style at beta. The error you are seeing comes from Flow types
in a dependency, which are not handled by the bundler configuration in
the workshop. The latest version does not contain any Flow types.

Andreas.
On Wed, Sep 26, 2018 at 9:39 AM Dimitris Kar <dkarakostis at gmail.com> wrote:
>
> I have started the OpenLayers workshop (https://openlayers.org/workshop/en) but I am stacked in the vectortiles section (https://openlayers.org/workshop/en/vectortile/bright.html) and more specifically in the use of  import {apply} from 'ol-mapbox-style'; in order to load styles, which I created with Maputnik.
>
> The problem occurs after I install: npm install ol-mapbox-style at beta Then when I run npp start I get the following error message:
>
> ERROR in ./node_modules/@mapbox/mapbox-gl-style-spec/expression/definitions/interpolate.js
> Module parse failed: Unexpected token (9:12)
> You may need an appropriate loader to handle this file type.
> | import { findStopLessThanOrEqualTo } from '../stops';
> |
> | import type { Stops } from '../stops';
> | import type { Expression } from '../expression';
> | import type ParsingContext from '../parsing_context';
>  @ ./node_modules/@mapbox/mapbox-gl-style-spec/function/index.js 7:0-64 95:33-44 108:16-27
>  @ ./node_modules/ol-mapbox-style/stylefunction.js
>  @ ./node_modules/ol-mapbox-style/index.js
>  @ ./main.js
>  @ multi (webpack)-dev-server/client?http://localhost:3000 ./main.js
> ℹ 「wdm」: Failed to compile.
>
> I am using a Mac and my node version is v10.10.0. Any idea what can be the problem here?
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/openlayers-users


More information about the Users mailing list