iamanvesh / mapbox-gl-draw-circle

Supports drawing/editing a circle on a Mapbox map.
https://iamanvesh.github.io/mapbox-gl-draw-circle-test/
MIT License
74 stars 59 forks source link

Issue when using mapbox-gl-draw-circle with Angular 9 #31

Open karimkun opened 3 years ago

karimkun commented 3 years ago

Hi,

When using the package with angular 9, it doesn't work, I have this error :

ERROR in ./node_modules/jsonlint-lines/lib/jsonlint.js Module not found: Error: Can't resolve 'fs' in 'C:\Workspace\COVAL-web\node_modules\jsonlint-lines\lib'

Any help please?

lbrutti commented 3 years ago

Hello, try adding this entry in package.json

 "browser": {
        "fs": false,
        "os": false,
        "path": false
    },

At topmost level.

For me it worked ;)

Yuki-Zhao commented 3 years ago

i

Hello, try adding this entry in package.json

"browser": {
     "fs": false,
     "os": false,
     "path": false
 },

At topmost level.

For me it worked ;)

it doesn't work

Yuki-Zhao commented 3 years ago

Is there another way ?

Yuki-Zhao commented 3 years ago

add node in webpack.config.js image