npx run command failing, module not found

This issue occured while running twenty project on local in WSL setup
> node dist/src/command/command.js cache:flush

node:internal/modules/cjs/loader:1080
throw err;
^

Error: Cannot find module '/home/muralidhar1404/twenty/packages/twenty-server/dist/src/command/command.js'
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
Warning: command "node dist/src/command/command.js cache:flush" exited with non-zero status code
—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

NX Ran target command-no-deps for project twenty-server (124ms)

With additional flags:
cache:flush

✖ 1/1 failed
✔ 0/1 succeeded [0 read from cache]

Warning: command "nx command-no-deps -- cache:flush" exited with non-zero status code
————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

NX Ran target database:reset for project twenty-server and 3 task(s) they depend on (30s)

✖ 1/4 failed
✔ 3/4 succeeded [3 read from cache]
> node dist/src/command/command.js cache:flush

node:internal/modules/cjs/loader:1080
throw err;
^

Error: Cannot find module '/home/muralidhar1404/twenty/packages/twenty-server/dist/src/command/command.js'
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
Warning: command "node dist/src/command/command.js cache:flush" exited with non-zero status code
—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

NX Ran target command-no-deps for project twenty-server (124ms)

With additional flags:
cache:flush

✖ 1/1 failed
✔ 0/1 succeeded [0 read from cache]

Warning: command "nx command-no-deps -- cache:flush" exited with non-zero status code
————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

NX Ran target database:reset for project twenty-server and 3 task(s) they depend on (30s)

✖ 1/4 failed
✔ 3/4 succeeded [3 read from cache]
4 Replies
Prastoin
Prastoin3w ago
Hello @Muralidhar, some context would be appreciated Maybe you're unable to build twenty-server right now
Muralidhar
MuralidharOP3w ago
Hi @Prastoin actually am trying to run the project in the local env. on wsl, I wonder why this issue is occuring
thomast
thomast3w ago
What doc did you follow to setup the project?
Muralidhar
MuralidharOP3w ago
hey I followed the twenty docs local setup for WSL: https://twenty.com/developers/local-setup, now it's working fine ✅, idk why this issue occured earlier @thomast @Prastoin

Did you find this page helpful?