Closed webtango closed 2 years ago
I'm going to need a little more info, what's the full stack trace ?
This is the stack from the browser:
tryCatch
node_modules/@babel/runtime/node_modules/regenerator-runtime/runtime.js:62
Generator.invoke [as _invoke]
node_modules/@babel/runtime/node_modules/regenerator-runtime/runtime.js:288
Generator.prototype.
Let me know if you need more.
Thanks
that's not the real stack, please run
run
shpjs(shapeFileURL).then(function(geojson){
console.log('Converted');
}).catch(function(error) {
console.log('STACK:', error.stack);
});
and tell me what gets printed after STACK:
Sorry screw up on my part with my import. Should be import shpjs from 'shpjs'; I was doing it with brackets. import { shpjs } from 'shpjs';
I have installed the package through npm and I import the package with: import { shpjs } from 'shpjs/dist/shp.js';
I have a function that gets the URL to my S3 bucket but when I call: shpjs(shapeFileURL).then(function(geojson){ console.log('Converted'); }).catch(function(error) { console.log(error); });
I get an exception: Unhandled Rejection (TypeError): Object(...) is not a function
Any advice on what I am doing wrong or if this is a known issue?
Thanks