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 read properties of undefined (reading 'map') #238

Closed
mStirner opened this issue Nov 27, 2022 · 1 comment
Closed

TypeError: Cannot read properties of undefined (reading 'map') #238

mStirner opened this issue Nov 27, 2022 · 1 comment
Labels
bug Something that should not be like that close Discuss to be closed or closed soon investigate

Comments

@mStirner
Copy link
Member

On my local deployment test, updating to v2 the following error shows up:

Nov 27 19:35:46 open-haus.lan node[19177]: /opt/OpenHaus/backend-v2.0.0/components/store/class.store.js:33
Nov 27 19:35:46 open-haus.lan node[19177]:         this.config = obj.config.map((data) => {
Nov 27 19:35:46 open-haus.lan node[19177]:                                  ^
Nov 27 19:35:46 open-haus.lan node[19177]: TypeError: Cannot read properties of undefined (reading 'map')
Nov 27 19:35:46 open-haus.lan node[19177]:     at new Store (/opt/OpenHaus/backend-v2.0.0/components/store/class.store.js:33:34)
Nov 27 19:35:46 open-haus.lan node[19177]:     at /opt/OpenHaus/backend-v2.0.0/components/store/index.js:78:24
Nov 27 19:35:46 open-haus.lan node[19177]:     at Array.map (<anonymous>)
Nov 27 19:35:46 open-haus.lan node[19177]:     at /opt/OpenHaus/backend-v2.0.0/components/store/index.js:77:25
Nov 27 19:35:46 open-haus.lan node[19177]:     at /opt/OpenHaus/backend-v2.0.0/node_modules/mongodb/lib/utils.js:348:28
Nov 27 19:35:46 open-haus.lan node[19177]:     at processTicksAndRejections (node:internal/process/task_queues:96:5)
@mStirner mStirner added bug Something that should not be like that investigate labels Nov 27, 2022
@mStirner
Copy link
Member Author

Comes from old schema:

OpenHaus [direct: primary] OpenHaus> db.store.find()
[
  {
    _id: ObjectId("6283effb323aeb5f1a1e3a3b"),
    key: 'interval',
    description: 'API Polling interval',
    namespace: 'd11e7f38-91cb-4f32-89e8-3452f624bb47',
    value: 3000,
    timestamps: { created: 1652813819453, updated: null }
  }
]

How migrate that?!

@mStirner mStirner added the close Discuss to be closed or closed soon label Jan 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that should not be like that close Discuss to be closed or closed soon investigate
Projects
None yet
Development

No branches or pull requests

1 participant