require('dotenv').config({path: __dirname + '/../.env'})

const NEXMO_API_KEY = process.env.NEXMO_API_KEY
const NEXMO_API_SECRET = process.env.NEXMO_API_SECRET

// By default use the command line argument. Otherwise use the environment variable.
const INSIGHT_NUMBER = process.argv[2] || process.env.INSIGHT_NUMBER;

const Nexmo = require('nexmo');

const nexmo = new Nexmo({
  apiKey: NEXMO_API_KEY,
  apiSecret: NEXMO_API_SECRET
});

nexmo.numberInsight.get({level: 'advanced', number: INSIGHT_NUMBER}, (error, result) => {
  if(error) {
    console.error(error);
  }
  else {
    console.log(result);
  }
});

require('dotenv').config({path: __dirname + '/../.env'})

const NEXMO_API_KEY = process.env.NEXMO_API_KEY
const NEXMO_API_SECRET = process.env.NEXMO_API_SECRET

// By default use the command line argument. Otherwise use the environment variable.
const INSIGHT_NUMBER = process.argv[2] || process.env.INSIGHT_NUMBER;

const Nexmo = require('nexmo');

const nexmo = new Nexmo({
  apiKey: NEXMO_API_KEY,
  apiSecret: NEXMO_API_SECRET
});

nexmo.numberInsight.get({level: 'advancedSync', number: INSIGHT_NUMBER}, (error, result) => {
  if(error) {
    console.error(error);
  }
  else {
    console.log(result);
  }
});

Change level from `advanced` to `advancedSync`
Change level from `advanced` to `advancedSync`

As per: https://github.com/Nexmo/nexmo-node/pull/232