Using "_" is deprecated. Use "require('lodash')" instead

I’ve begun receiving a warning message in the console for every request since upgrading to Postman version 11. Could you clarify the significance of this message and provide a resolution?

Warning Message : Using “_” is deprecated. Use “require(‘lodash’)” instead.

Hey @devang-ey :wave:

The warning message is telling you what’s happening.

Using “_” is deprecated. Use “require(‘lodash’)” instead.

This would have been seen just before V11, as the sandbox was updated towards the end of V10.

There a several internal sandbox modules that are being deprecated and this is one of them. We actually have 2 different versions of Lodash running, an older one that is immediately available using the _. naming convention and one where you use require(‘lodash’) to call the newer version.

For example:

const lodash = require('lodash');
console.log(lodash.random(10, 12));

The _ option will still be supported for the next 2 major versions but it will eventually stop working in the sandbox.