GeoTIFF/georaster-layer-for-leaflet

Module parse failed: Unexpected token in Nuxt JS SSR

eljahon opened this issue · 1 comments

in ./node_modules/georaster-layer-for-leaflet/dist/georaster-layer-for-leaflet.min.js 2:37677
Module parse failed: Unexpected token (2:37677)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| /*! For license information please see georaster-layer-for-leaflet.min.js.LICENSE.txt */

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("leaflet")):"function"==typeof define&&define.amd?define(["leaflet"],e):"object"==typeof exports?exports.GeoRasterLayer=e(require("leaflet")):t.GeoRasterLayer=e(t.L)}(self,(t=>(()=>{var e={1950:function(t,e,a){var n;t=a.nmd(t),function(){var \\ .................................................................... !!!!!!!!!!!!!

hi, thanks for submitting this issue. I'm not sure of the cause, but this issue usually happens when we encounter newish syntax that isn't fully supported by whatever browser or Node version we are using.

Some examples of the syntax that could throw the error are:

Here's an example of adding babel plugins: https://github.com/GeoTIFF/geoblaze/blob/master/webpack.config.js#L55

Let me know if this helps or if you have any other questions.
What framework are you using? Is this create-react-app? I know create-react-app doesn't always have the latest babel plugins.

This can probably be solved by adding some babel plugins to your webpack configuration.