hildjj / node-cbor

Encode and decode CBOR documents, with both easy mode, streaming mode, and SAX-style evented mode.
MIT License
357 stars 73 forks source link

TD is not a constructor - Node 6.x #94

Closed Ylianst closed 5 years ago

Ylianst commented 5 years ago

I am with the MeshCentral project and have users on Node 6.x. You latest change just broke it with the error below. I did notice in GitHub that Node 6 is no longer supported. Any way this could be reconsidered? Users issues on my side are here. Thanks.

C:\tmp\node_modules\cbor\lib\utils.js:21
const td = new TD('utf8', {fatal: true, ignoreBOM: true})
           ^

TypeError: TD is not a constructor
    at Object.<anonymous> (C:\tmp\node_modules\cbor\lib\utils.js:21:12)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:456:32)
    at tryModuleLoad (module.js:415:12)
    at Function.Module._load (module.js:407:3)
    at Module.require (module.js:466:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\tmp\node_modules\cbor\lib\commented.js:5:15)
    at Module._compile (module.js:541:32)

    at ChildProcess.exithandler (child_process.js:202:12)
    at emitTwo (events.js:111:20)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:850:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
  killed: false,
  code: 1,
  signal: null,
  cmd: 'xxx' }
hildjj commented 5 years ago

Hm. My tooling no longer works on Node 6, because nyc doesn't work there anymore. I could potentially reenable support for 6, but not do coverage. Let me see if I can get something working in the morning.

hildjj commented 5 years ago

It's worse than I thought. ava doesn't support node 6 anymore, so I can't run tests. I'm going to try dropping back to an earlier version.

hildjj commented 5 years ago

Just published 4.2.1 for you. I do want to remove support for Node6 one day, so that I'm not trapped on an old version of ava forever, and so that we have support for the fix to #10.

@Ylianst can you please file a "drop support for node 6" bug on your project, and reference #95 so that I can track when you're ready?

hildjj commented 3 years ago

See #95 and #124.