Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined is not a function (evaluating '_lodash.default.insert()) #20

Open
mnlbox opened this issue Apr 15, 2019 · 1 comment
Open

Comments

@mnlbox
Copy link

mnlbox commented Apr 15, 2019

Hi,
I want use this library but It's not working at all and return below error:
undefined is not a function (evaluating '_lodash.default.insert(new_notes, { date: date, title: title, note: note });

What is the issue?
Any specific import needed? I just import Lodash

/CC: @typicode, @lukehorvat, @Dununan, @justcfx2u

@cefn
Copy link

cefn commented Sep 27, 2019

To make the functions of this mixin available on lodash, you need to apply it as a mixin...

Welcome to Node.js v12.4.0.
Type ".help" for more information.
> lodash = require('lodash')
> lodashId = require('lodash-id')
> lodash.getById([{id:"first", "title": "Working"}], "first")
Thrown:
TypeError: lodash.getById is not a function
> lodash.mixin(lodashId)
> lodash.getById([{id:"first", "title": "Working"}], "first")
{ id: 'first', title: 'Working' }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants