Converting Geojson to Shapefile in Javascript using shp-write
问题 I'm using Mapbox, and I'm trying to convert a Geojson to a zipped shapefile using shp-write. But when I follow the example given on the GitHub page, I'm getting a "ReferenceError: require is not defined" error on this line: var shpwrite = require('shp-write'); This is a jsfiddle in which you can test this. I'm relatively new to JavaScript, and haven't had to use the 'require()' function before. 回答1: The jsfiddle you provided includes several external resources, among which a shpwrite