mapbox / dbf

dbf writer
BSD 2-Clause "Simplified" License
37 stars 56 forks source link

'offset' is not defined #30

Closed iofirag closed 1 year ago

iofirag commented 6 years ago

i'm get the error 'offset' is not defined because i use strict mode. so the fix for this kind of issue is to change

in dbf/src/structure.js

(line number 58) from:

offset = fieldDescLength + 32;

to:

var offset = fieldDescLength + 32;

SaiAnandPeketi-GIS commented 1 year ago

I'm also getting this issue after upgrading, angular version from 12 to 14. Is it any fix available in the latest code?

sheindel commented 1 year ago

This is (finally) fixed in https://github.com/mapbox/dbf/pull/24. Thanks for the feedback!

SaiAnandPeketi-GIS commented 1 year ago

Hi Sheindel, Thanks for the fixes the issue. But still, I'm facing this issue while loading the npm package in my application and found that the code is not updated in it. Still "var" is missing in line number 58

https://www.npmjs.com/package/dbf?activeTab=code image

sheindel commented 1 year ago

Thanks for pinging. I'll see if I can get a new version deployed with these fixes. Hopefully will be available by next week sometime

onkarj422 commented 1 year ago

This still seems not fixed, shall we reopen this? Any update?

sheindel commented 1 year ago

It's definitely patched in dbf, check src/structure.js.

Are you perhaps using something that uses dbf? Perhaps shp-write?

jorosafi commented 1 year ago

In case anyone else using shp-write runs into this ReferenceError, all you need to do is update it using shp-write's new package location under the Mapbox organization -- https://www.npmjs.com/package/@mapbox/shp-write

The old package location has been deprecated and does not appear include this dbf fix.