Node-NTRIP / caster

Node.js NTRIP caster library with full NTRIP V1/V2 support and more.
https://www.npmjs.com/package/@ntrip/caster
GNU General Public License v3.0
46 stars 18 forks source link

Won't run when imported, fine in unit test "HTTP module imported before HTTPParser was bound" #9

Open TaylorDale opened 2 years ago

TaylorDale commented 2 years ago

If I clone the repo and run npm test, works perfectly fine. However if I import it to my own project (Issue occurs upon import - doesn't even get to run code) I get the following error: image

Attempting to run the simple example from the unit test in my own project: import { AuthRequest, Caster, NtripHTTPParser, NtripTransport, } from '@ntrip/caster'; const caster = new Caster({ authManager: { async authenticate(auth: AuthRequest) { return { ...auth, authenticated: true }; }, }, }); caster.addTransport(NtripTransport.new({ port: 2101 }));

Results in this error.

allard-potma commented 1 year ago

Came across this. It has to do with the nodeJS version. Overriding the http_parser is not possible anymore since nodeJS 13 if I'm correct.