hoodiehq / hoodie-client

:dog: Client API for the Hoodie server
Apache License 2.0
34 stars 25 forks source link

lodash as a module dependency (instead of devDependency) #96

Closed brunopedroso closed 8 years ago

brunopedroso commented 8 years ago

I've writen a script that requires @hoodie/client, just as described in the readme, but it throwed an error on require:

>> Error: Cannot find module 'lodash/defaultsDeep'

I suppose that's because my app's dependency tree ends up including an older version on lodash, and once @hoodie/client does not specify lodash as a dependency (only as a devDependency) it ends up using that older version, that does not have that file...

I tried to create a node_modules dir inside node_mocules/@hoodie/client and copy a newer version of lodash there and the error has gone.

Also, looking at the places where defaultsDeep is used in this module, it seems to me it's actually not only a dev dependency..

gr2m commented 8 years ago

yes, you are right, good catch! Could you please send a pull request to fix it? Commit the change with fix(package): lodash ➞ dependencies