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: Module '"lodash"' has no default export. #2549

Closed
yoshiokatsuneo opened this issue Apr 27, 2017 · 5 comments
Closed

Error: Module '"lodash"' has no default export. #2549

yoshiokatsuneo opened this issue Apr 27, 2017 · 5 comments

Comments

@yoshiokatsuneo
Copy link
Contributor

  • [*] I understand that GitHub issues are not for tech support, but for questions specific to this generator, bug reports, and feature requests.

I just installed the latest [email protected].
And, I just generated a project as a TypeScript project.
Then, "gulp serve" cause error like:

[default] /private/tmp/yots3/client/components/auth/auth.service.ts:3:8 
    Module '"lodash"' has no default export.
[default] /private/tmp/yots3/client/components/auth/auth.service.ts:192:14 
    Supplied parameters do not match any signature of call target.
Item Version
generator-angular-fullstack 4.2.0
Node 6.10.2
npm 3.10.10
Operating System OS X 10
Item Answer
Transpiler TypeScript
Markup HTML
CSS SCSS
Router ui-router
Client Tests Mocha
DB MongoDB
Auth Y
@Awk34
Copy link
Member

Awk34 commented Apr 28, 2017

I assume this is because we are importing it as import _ from 'lodash', which is the syntax for import the default export, but the regular lodash module uses commonjs exports, not ES2015 import/exports

@davemaude
Copy link

davemaude commented May 8, 2017

I have this issue too. I changed it to read import * as _ from "lodash"; but that didn't resolve the second error regarding supplied parameters not matching any signature of call target. Is there an incompatibility between angular-fullstack and lodash?

@kailanjian
Copy link

I had the same issue. I used@davemaude's fix and (it looks like) it worked. The auth checks were not working correctly with the default code generated so maybe this should be changed?

@Awk34 Awk34 closed this as completed in 2dde95d May 21, 2017
@albert-92
Copy link
Contributor

Would be great if the generator gets updated with that fix soon.

It took me 1/2 an hour to figure out what was going on.

@OBout
Copy link

OBout commented Aug 3, 2017

+1

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

6 participants