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

Error: Could not find module lodash/object/findKey #116

Open
kumkanillam opened this issue Jul 7, 2017 · 2 comments
Open

Error: Could not find module lodash/object/findKey #116

kumkanillam opened this issue Jul 7, 2017 · 2 comments

Comments

@kumkanillam
Copy link

In ember-cli version 2.11.0, the below import works earlier,
import findKey from 'lodash/object/findKey';
but after upgrading ember-cli to 2.13.3, it throws Error: Could not find module lodash/object/findKey`.

import { findKey } from 'lodash/object'; => this works
import { findKey } from 'lodash'; => this works
import findKey from 'lodash/object/findKey'; => this throws error.

@sukima
Copy link

sukima commented Dec 11, 2017

I don't think ES6 modules work that way.

lodash/object/findKey isn't a file with a default export. lodash/object is a file which exports the named function findKey This is why import { findKey } from 'lodash/object'; works as expected.

'Course I could be way wrong. I haven't ever used this. I just commented by looking at your comment.

@kumkanillam
Copy link
Author

@sukima thanks for your reply. import findKey from 'lodash/object/findKey' this worked in ember-cli version 2.11.0 but not in ember-cli to 2.13.3. do you find any reason for this behavior?.

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