TypeError:无法读取属性' _attributes'更新后未定义的

时间:2014-05-07 19:09:35

标签: javascript node.js orm sails.js waterline

TypeError:无法读取属性' _attributes'未定义的

将我的风帆应用程序重建为 sails@0.10-rc6 sails-mysql@0.10-rc5 之后。

日志:

TypeError: Cannot read property '_attributes' of undefined
    at /Users/tebesfinwo/Sites/club_script/node_modules/sails/node_modules/waterline/lib/waterline/adapter/sync/strategies/alter.js:83:68
    at bound (/Users/tebesfinwo/Sites/club_script/node_modules/sails/node_modules/lodash/dist/lodash.js:957:21)
    at applyInOriginalCtx (/Users/tebesfinwo/Sites/club_script/node_modules/sails/node_modules/waterline/lib/waterline/utils/normalize.js:365:80)
    at wrappedCallback (/Users/tebesfinwo/Sites/club_script/node_modules/sails/node_modules/waterline/lib/waterline/utils/normalize.js:264:18)
    at _normalizeCallback.callback.success (/Users/tebesfinwo/Sites/club_script/node_modules/sails/node_modules/waterline/node_modules/node-switchback/lib/normalize.js:33:26)
    at _switch (/Users/tebesfinwo/Sites/club_script/node_modules/sails/node_modules/waterline/node_modules/node-switchback/lib/factory.js:34:26)
    at /Users/tebesfinwo/Sites/club_script/node_modules/sails-mysql/lib/connections/spawn.js:116:16
    at Object.module.exports.poolfully [as releaseConnection] (/Users/tebesfinwo/Sites/club_script/node_modules/sails-mysql/lib/connections/release.js:28:12)
    at /Users/tebesfinwo/Sites/club_script/node_modules/sails-mysql/lib/connections/spawn.js:101:35
    at Query._callback (/Users/tebesfinwo/Sites/club_script/node_modules/sails-mysql/lib/adapter.js:438:11)

注意:

sails@0.10-rc6 & waterline@0.10-rc11 :抛出上面的错误。

1 个答案:

答案 0 :(得分:1)

这是Waterline(rc11)的特定版本中引入的问题。它建议您升级到Sails的v0.10.0-rc7版本,这将解决此问题和其他一些问题。也就是说' S:

npm install sails@beta

npm install -g sails@beta

进行全局安装!