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

Consistent error when running shp2json from the CLI #30

Closed
nickrttn opened this issue Jan 5, 2017 · 2 comments
Closed

Consistent error when running shp2json from the CLI #30

nickrttn opened this issue Jan 5, 2017 · 2 comments

Comments

@nickrttn
Copy link

nickrttn commented Jan 5, 2017

Everytime I run shp2json from the command line, I get the error

error: Decoder not present. Did you forget to include encoding-indexes.js first?

I've used shp2json with success before and this error only started occurring after a full reinstall of OSX. It happens on node 6.9.3 as well as 7.3 and 7.4.

Please let me know if there's any other information useful for debugging this.

@mbostock
Copy link
Owner

mbostock commented Jan 5, 2017

Unfortunately, I am not able to reproduce this error, so I don’t know how to investigate. I have filed inexorabletash/text-encoding#67 as this appears to be an issue with the text-encoding polyfill. I have also reverted shapefile to an earlier version of text-encoding (0.6.1) that hopefully does not exhibit this issue, as this appears to be a bug in a more recent release of text-encoding.

Questions for you:

  1. Did you install shp2json locally (npm install shapefile) or globally (npm install -g shapefile)?

  2. If you installed it locally, what is the output of npm ls? If globally, npm ls -g?

  3. How are you invoking shp2json? Are you specifying the --encoding argument? Are you passing a shapefile as the first argument, or are you piping a shapefile via stdin?

  4. Do you have anything unusual in your Node setup, such as an alias that would pass default arguments to Node (say --use-strict)?

If you can reply over on inexorabletash/text-encoding#67 that would be helpful for debugging, or you can reply here and I will relay the information.

@nickrttn
Copy link
Author

nickrttn commented Jan 5, 2017

I've replied over at inexorabletash/text-encoding#67. Just wanted to mention that downgrading text-encoding seems to have fixed the problem so it's likely a regression on their end.

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

2 participants