szmarczak / cacheable-lookup

A cacheable dns.lookup(…) that respects TTL :tada:
MIT License
193 stars 29 forks source link

Cannot run on Node 10 #30

Closed fuyifan closed 4 years ago

fuyifan commented 4 years ago

const { V4MAPPED, ADDRCONFIG, promises: { Resolver: AsyncResolver }, lookup } = require('dns');

TypeError: Cannot destructure property Resolver of 'undefined' or 'null'. at Object. (d:\parapara_oppo\server\LoginServer\node_modules\cacheable-lookup\source\index.js:9:5) at Module._compile (internal/modules/cjs/loader.js:678:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10) at Module.load (internal/modules/cjs/loader.js:589:32) at tryModuleLoad (internal/modules/cjs/loader.js:528:12) at Function.Module._load (internal/modules/cjs/loader.js:520:3) at Module.require (internal/modules/cjs/loader.js:626:17) at require (internal/modules/cjs/helpers.js:20:18)

szmarczak commented 4 years ago

Update your Node.js 10 version.

szmarczak commented 4 years ago

https://nodejs.org/docs/latest-v10.x/api/dns.html#dns_dns_promises_api