You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for this awesome tool! I'm excited to use it in my geodata wrangling :)
I tried following the instructions in README.md and got an error:
Uncaught TypeError TypeError: ogr2ogr is not a function
Here is my code:
import ogr2ogr from 'ogr2ogr';
(async () => {
const { data } = await ogr2ogr('/path/to/a.shp');
console.log(data);
})();
and indeed when I console.log(ogr2ogr) I get an object:
{default: ƒ, __esModule: true}
The following works, if I access that default property by name:
const { data } = await ogr2ogr.default('/path/to/data');
Also, I made sure my package.json has the old "type": "module" to enable ES6 imports.
Is there anything I'm doing that may be causing my install to behave a bit differently than what's in the README? Would appreciate any pointers on this!!!
The text was updated successfully, but these errors were encountered:
Thank you for this awesome tool! I'm excited to use it in my geodata wrangling :)
I tried following the instructions in
README.md
and got an error:Here is my code:
and indeed when I
console.log(ogr2ogr)
I get an object:The following works, if I access that
default
property by name:Also, I made sure my
package.json
has the old"type": "module"
to enable ES6 imports.Is there anything I'm doing that may be causing my install to behave a bit differently than what's in the README? Would appreciate any pointers on this!!!
The text was updated successfully, but these errors were encountered: