Reputation: 5451
I get an issue using lodash
with NPM
.
My code :
var _ = require('lodash');
console.log(_.chunk(['1','2','3','4'], 3));
Response : _.chunk is not a function
Lodash version : latest : 4.17.4
Upvotes: 1
Views: 638
Reputation: 1397
The example you have included is syntactically correct. I would suggest that you make sure that the package is installed correctly.
$ npm i -g npm
$ npm i --save lodash
Upvotes: 1