Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'offset' is not defined #30

Closed
iofirag opened this issue May 27, 2018 · 7 comments
Closed

'offset' is not defined #30

iofirag opened this issue May 27, 2018 · 7 comments

Comments

@iofirag
Copy link

iofirag commented May 27, 2018

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
Copy link

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

@sheindel
Copy link
Contributor

sheindel commented Feb 8, 2023

This is (finally) fixed in #24. Thanks for the feedback!

@sheindel sheindel closed this as completed Feb 8, 2023
@SaiAnandPeketi-GIS
Copy link

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
Copy link
Contributor

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
Copy link

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

@sheindel
Copy link
Contributor

sheindel commented Aug 2, 2023

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

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

@jorosafi
Copy link

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.

farkmarnum added a commit to PropagateAg/shp-write that referenced this issue Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants