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

Lodash 4.0 issue #21

Open
talvor opened this issue Jan 24, 2016 · 1 comment
Open

Lodash 4.0 issue #21

talvor opened this issue Jan 24, 2016 · 1 comment
Labels

Comments

@talvor
Copy link

talvor commented Jan 24, 2016

The lodash depencency in package.json does not specify a version. Lodash has just released 4.0 which now breaks the adapter. The following error is received.

[Error: Must have one or two primary key attributes.]
Unhandled rejection Error: Must have one or two primary key attributes.
    at Object.module.exports.adapter._createModel (C:\Users\phall\Projects\leap-auth\node_modules\sails-dynamodb\index.js:150:15)
    at C:\Users\phall\Projects\leap-auth\node_modules\sails-dynamodb\index.js:352:17
    at C:\Users\phall\Projects\leap-auth\node_modules\sails-dynamodb\node_modules\lodash\lodash.js:3925:15
    at baseForOwn (C:\Users\phall\Projects\leap-auth\node_modules\sails-dynamodb\node_modules\lodash\lodash.js:2521:24)
    at Function.forOwn (C:\Users\phall\Projects\leap-auth\node_modules\sails-dynamodb\node_modules\lodash\lodash.js:10734:24)
    at Object.module.exports.adapter.registerConnection (C:\Users\phall\Projects\leap-auth\node_modules\sails-dynamodb\index.js:351:9)
    at C:\Users\phall\Projects\leap-auth\node_modules\waterline\lib\waterline.js:203:29
    at C:\Users\phall\Projects\leap-auth\node_modules\waterline\node_modules\async\lib\async.js:162:20
    at C:\Users\phall\Projects\leap-auth\node_modules\waterline\node_modules\async\lib\async.js:230:13
    at _arrayEach (C:\Users\phall\Projects\leap-auth\node_modules\waterline\node_modules\async\lib\async.js:81:9)
    at _each (C:\Users\phall\Projects\leap-auth\node_modules\waterline\node_modules\async\lib\async.js:72:13)
    at Object.async.forEachOf.async.eachOf (C:\Users\phall\Projects\leap-auth\node_modules\waterline\node_modules\async\lib\async.js:229:9)
    at Object.async.forEach.async.each (C:\Users\phall\Projects\leap-auth\node_modules\waterline\node_modules\async\lib\async.js:206:22)
    at Array.async.auto.registerConnections (C:\Users\phall\Projects\leap-auth\node_modules\waterline\lib\waterline.js:176:13)

    at C:\Users\phall\Projects\leap-auth\node_modules\waterline\node_modules\async\lib\async.js:590:38
    at _arrayEach (C:\Users\phall\Projects\leap-auth\node_modules\waterline\node_modules\async\lib\async.js:81:9)
    at Object.async.auto (C:\Users\phall\Projects\leap-auth\node_modules\waterline\node_modules\async\lib\async.js:552:9)
    at Waterline.initialize (C:\Users\phall\Projects\leap-auth\node_modules\waterline\lib\waterline.js:121:9)
    at C:\Users\phall\Projects\leap-auth\node_modules\waterline-models\index.js:52:19
    at tryCatcher (C:\Users\phall\Projects\leap-auth\node_modules\waterline-models\node_modules\bluebird\js\main\util.js:26:23)
    at Function.Promise.fromNode (C:\Users\phall\Projects\leap-auth\node_modules\waterline-models\node_modules\bluebird\js\main\promise.js:165:30)
    at C:\Users\phall\Projects\leap-auth\node_modules\waterline-models\index.js:51:22

I have resolved this by deleting the lodash folder from the node_modules\sails-dynamodb\node_modules folder so during runtime the top level lodash is used.

The package.json file needs to specify a dependency on lodash ^3.0.0.

@devinivy devinivy added the bug label Jan 25, 2016
@devinivy
Copy link
Collaborator

#22 merged. Can't right now, but will try to get a release out soon.

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

No branches or pull requests

2 participants