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

upgrading from 2.3.x to 2.8.x errors on first try #11173

Closed
barisusakli opened this issue Jan 18, 2023 · 2 comments
Closed

upgrading from 2.3.x to 2.8.x errors on first try #11173

barisusakli opened this issue Jan 18, 2023 · 2 comments
Assignees
Labels
Milestone

Comments

@barisusakli
Copy link
Member

Error occurred during upgrade: TypeError: maxAge must be a number
    at LRUCache.set (/home/saas/nodebb/node_modules/lru-cache/index.js:157:13)
    at Object.cache.set (/home/saas/nodebb/src/cache/lru.js:68:12)
    at /home/saas/nodebb/src/database/mongo/hash.js:138:10
    at Array.forEach (<anonymous>)
    at module.getObjectsFields (/home/saas/nodebb/src/database/mongo/hash.js:136:16)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async module.getObjects (/home/saas/nodebb/src/database/mongo/hash.js:92:10)
    at async module.getObject (/home/saas/nodebb/src/database/mongo/hash.js:87:16)
    at async Configs.getFields (/home/saas/nodebb/src/meta/configs.js:111:12)
    at async Configs.list (/home/saas/nodebb/src/meta/configs.js:98:9)

Running it again works fine, possibly due to lru-cache depency getting upgraded during ./nodebb upgrade but the old one is still being used since its already loaded.

@barisusakli barisusakli self-assigned this Jan 18, 2023
@barisusakli barisusakli added this to the 2.9.0 milestone Jan 18, 2023
@barisusakli
Copy link
Member Author

This was caused by lru-cache@6.0.0 being loaded by semver before the upgrade script had a chance to upgrade the dependencies.

@julianlam
Copy link
Member

Thanks for figuring it out 😄

@barisusakli barisusakli reopened this Mar 20, 2023
@barisusakli barisusakli modified the milestones: 2.9.0, 3.0.0 Apr 26, 2023
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