Vue2Leaflet: build error Cannot find namespace 'L'
Description
hello everyone i use vue-cli@3.x & typescript template but i got a build error
Steps to Reproduce
just execyarn build
Expected Results
No error is throw
Actual Results

About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 17 (7 by maintainers)
Any update on this? I’m using the very same setup of @Xixi20160512. I also installed
@types/leaflet, but the error persists.UPDATE: I solved this by adding a
/types/vue2-leaflet.d.tsfile to my project…i’m useing
"vue2-leaflet": "^2.1.1",and still getting the types error (onvue-cli-service serve).I had to install
@types/leafletand include @JimmyBastos 'sdeclare ...file (https://github.com/KoRiGaN/Vue2Leaflet/issues/291#issuecomment-460058926) to get it running again.I can confirm the fix: you need to manually install types: npm i -D @types/leaflet
@JimmyBastos yep thats the quickest way to fix it. the code in master should not have the issue.