app/dist not found
jensastrupTRIAL
10 months ago
Hello,
I copied my production environment to a new environment called staging. Production deploys and works beautifully, but the alleged copy does not which is stumping me. I'm getting the following error:
Starting Container
yarn run v1.22.22
warning package.json: No license field
$ node -r module-alias/register ./dist --env=production
node:internal/modules/cjs/loader:1189
throw err;
^
Error: Cannot find module '/app/dist'
at Module._resolveFilename (node:internal/modules/cjs/loader:1186:15)
at Module._resolveFilename (/app/node_modules/module-alias/index.js:49:29)
at Module._load (node:internal/modules/cjs/loader:1012:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:158:12)
at node:internal/main/run_main_module:30:49 {
code: 'MODULENOTFOUND',
requireStack: []
}
Node.js v22.2.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
container event container restart
yarn run v1.22.22
warning package.json: No license field
$ node -r module-alias/register ./dist --env=production
More bizarrely, if I "restart" the deployment, 90% of the time the build then succeeds. But in the background a series of restarts are triggered until one fails.
ⓘ Deployment information is only viewable by project members and Railway employees.
2 Replies
jensastrupTRIAL
10 months ago
Swear I ran my build and start commands locally and saw things working, but this was on me, nvm