I flushed my redis db and now i get > "Metadata version not found for workspace"
Whatever i do i'm not able to restore or fix this. any advice?
15 Replies
Hello @Bartel Verkruijssen
I'm not sure about this one, would run
yarn command:prod migrate
refill the cache @Weiko ?@Bartel Verkruijssen try running
yarn command:prod workspace:sync-metadata
it should recompute the cache for youlet me try
thanks that was the fix
Hey @prastoin @Weiko, I ran the same command in my root dir yarn command:prod workspace:sync-metadata, but I got the below error. Do you know what's the issue?
node:internal/modules/cjs/loader:1080
throw err;
^
Error: Cannot find module '/Users/rishisoni/Documents/Projects/pi/stackline-new/packages/twenty-server/dist/src/command/command'
at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
at Module._load (node:internal/modules/cjs/loader:922:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:23:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
Node.js v18.17.1
Hey @Rishi S, is it in local or in a docker container ? Please be sure to run the command in
packages/twenty-server
if in localHey @prastoin @Weiko, I get same error when users try to login. Errors while running in docker container. Works fine locally.:
Role assignment error for user <user_id> in workspace <workspace_id>: Metadata version not found for workspace <workspace_id>
[Nest] 1 - 04/19/2025, 5:26:00 AM ERROR [ExceptionsHandler] Metadata version not found for workspace <workspace_id>
Error: Metadata version not found for workspace <workspace_id>
@Amiteshwar try reflushing your cache
Using sync metadata command or cache flush
This
In local at path
packages/twenty-server
if in docker container in twenty-server container at rootok. should i run this at the root directory of my app?
packages/twenty-server sounds good
Ok let me know ! Enjoy coding !
@prastoin do i need to run the normal yarn command at project root (like in local setup) before the above command? Running the docker container in ec2.
got this error upon running "yarn command:prod workspace:sync-metadata" in twenty-server:
Usage Error: Couldn't find the node_modules state file - running an install might help (findPackageLocation)
$ yarn run [--inspect] [--inspect-brk] [-T,--top-level] [-B,--binaries-only] [--require #0] <scriptName> ...
If running the project in local please run from twenty-server path, checking twenty-server package.json you should be able to find the command:prod script entry
If not please connect and exec the command from twenty-server or twenty-worker container
Also should be able to find the package.json with script entry
In local you need to build the app before
npx nx build twenty-server
I'm running the app deployed (docker compose up) on an aws EC2 instance.
Ok then you need to connect to either your twenty-server or twenty-worker container
And execute the command at container's root
Might not be accurate depending your instance
You can also open a shell to your container etc etc
@prastoin this worked! Thank you
Great ! Enjoy coding !