Hi, please use the latest version of ol-mapbox-style instead of ol-mapbox-style@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 <dkarakos...@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@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 > us...@lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/openlayers-users _______________________________________________ Users mailing list us...@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/openlayers-users