shp2geobuf TypeError: stream.on is not a function
- Dominant language
- JavaScript
- Stars
- 1k
- Forks
- 86
- PR merge metrics
- No merged PRs in 30d
Description
```
/tmp/geobuf/node_modules/stream-source/index.node.js:8
that._stream = stream.on("readable", read).on("end", end).on("close", end).on("error", error);
^
TypeError: stream.on is not a function
at new StreamSource (/tmp/geobuf/node_modules/stream-source/index.node.js:8:25)
at module.exports (/tmp/geobuf/node_modules/stream-source/index.node.js:2:10)
at open (/tmp/geobuf/node_modules/shapefile/dist/shapefile.node.js:310:14)
at Object.read (/tmp/geobuf/node_modules/shapefile/dist/shapefile.node.js:358:10)
at Object. (/tmp/geobuf/bin/shp2geobuf:7:11)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
```
Contributor guide
Research direction
Start by reproducing the failure through bin/shp2geobuf, then read the call path shown in bin/shp2geobuf and node_modules/shapefile/dist/shapefile.node.js. Trace why stream-source receives a value without an on method; done means shp2geobuf processes the input without this TypeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100