Hi, i am trying to deploy our directus 10 repository for last 3 days.
At first i got error on Link Media Uploads + Activate New Deployment hook. It fixed when i changed package manager to pnpm. And build command to pnpx directus bootstrap, afterwards deployment completed successful but i got 502 error and couldn’t access to the site whatever i do. Then i changed the pm2’s config…
from:
script: “./cleavr.runner.js”,
args: “start”,
to:
script: “pnpx”,
args: “directus start”,
Then 502 error been solved and i can access to the website. But i noticed my cpu usage is around 80~90% constantly. My repository is pretty simple and has 3 files in it…
snapshot.yaml
pnpm-lock.yaml
package.json
I am not applying snapshot with deployment hooks so only important file is package.json and it contains:
I can’t see any error log, even though i tried other solutions for other bugs in the forum like adding “type”:“module” etc… Also i checked the cleavr’s example repository in github GitHub - cleavr/directus-example: Example Directus application but even deploying that repository causes same errors. Am i doing something wrong? really confused here…
We apologize for any inconvenience this has caused.
We are aware that high CPU usage can be an issue with the ecosystem config you are using. To help prevent this, we have implemented the runner file as the start script.
We are currently investigating the matter and will be in touch with you to discuss how we can be of assistance.
Appears to be something with pnpm. If I deploy using normal npm install hook it works fine. I found this error when using pnpm
0|gye0ptwv | You have triggered an unhandledRejection, you may have forgotten to catch a Promise rejection:
0|gye0ptwv | TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension "" for /home/cleavr/gye0ptwvvudg6ips7884.cleaver.rocks/releases/20230523034129613/node_modules/.bin/directus
0|gye0ptwv | at new NodeError (node:internal/errors:399:5)
0|gye0ptwv | at Object.getFileProtocolModuleFormat [as file:] (node:internal/modules/esm/get_format:79:11)
0|gye0ptwv | at defaultGetFormat (node:internal/modules/esm/get_format:121:38)
0|gye0ptwv | at defaultLoad (node:internal/modules/esm/load:81:20)
0|gye0ptwv | at nextLoad (node:internal/modules/esm/loader:163:28)
0|gye0ptwv | at ESMLoader.load (node:internal/modules/esm/loader:605:26)
0|gye0ptwv | at ESMLoader.moduleProvider (node:internal/modules/esm/loader:457:22)
0|gye0ptwv | at new ModuleJob (node:internal/modules/esm/module_job:64:26)
0|gye0ptwv | at #createModuleJob (node:internal/modules/esm/loader:480:17)
0|gye0ptwv | at ESMLoader.getModuleJob (node:internal/modules/esm/loader:434:34)