Firebase SDK on Google Cloud Console is not working. Upon using
firebase init
We get
/usr/local/nvm/versions/node/v16.1.0/lib/node_modules/firebase-tools/lib/emulator/portUtils.js:9 dns.setDefaultResultOrder("ipv4first"); ^
TypeError: dns.setDefaultResultOrder is not a function at Object. (/usr/local/nvm/versions/node/v16.1.0/lib/node_modules/firebase-tools/lib/emulator/portUtils.js:9:5) at Module._compile (node:internal/modules/cjs/loader:1109:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10) at Module.load (node:internal/modules/cjs/loader:989:32) at Function.Module._load (node:internal/modules/cjs/loader:829:14) at Module.require (node:internal/modules/cjs/loader:1013:19) at require (node:internal/modules/cjs/helpers:93:18) at Object. (/usr/local/nvm/versions/node/v16.1.0/lib/node_modules/firebase-tools/lib/emulator/registry.js:6:19) at Module._compile (node:internal/modules/cjs/loader:1109:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
Is anyone having these issues??
CodePudding user response:
Upgrade the version node installed on your system.
The current version is 16.15.1, you are using 16.1.0. IIRC the minimum v16 version is 16.4 or 16.5 (both are old)