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

TypeError: Cannot convert undefined or null to object at SqlStore._buildModels #52

Open
csprocket777 opened this issue Mar 25, 2017 · 1 comment

Comments

@csprocket777
Copy link

I am using the handler code from the example in the readme and am running into the error below when I run node.

Any ideas on how I can solve this?

/Users/[path to app]/node_modules/jsonapi-store-relationaldb/lib/sqlHandler.js:104
  var localAttributes = Object.keys(self.resourceConfig.attributes).filter(function(attributeName) {
                               ^

TypeError: Cannot convert undefined or null to object
    at SqlStore._buildModels (/Users/[path to app]/node_modules/jsonapi-store-relationaldb/lib/sqlHandler.js:104:32)
    at SqlStore.initialise (/Users/[path to app]/node_modules/jsonapi-store-relationaldb/lib/sqlHandler.js:72:8)
    at Object.jsonApi.define.resourceConfig [as define] (/Users/[path to app]/node_modules/jsonapi-server/lib/jsonApi.js:68:29)
    at Object.<anonymous> (/Users/[path to app]/index.js:29:9)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)
    at Module.runMain (module.js:575:10)
    at run (bootstrap_node.js:352:7)
    at startup (bootstrap_node.js:144:9)
    at bootstrap_node.js:467:3
@paparomeo
Copy link
Contributor

Hi @csprocket777. I'll try to reproduce and will get back to you.

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