EBS instance can't find NestJS nest command after being deployed

0

Which is really strange because the logs indicate that the deployment is successful. That is, up until the build command is run.

eb-engine.log

2023/08/14 12:13:49.351094 [INFO] Using npm v9
2023/08/14 12:13:49.351108 [INFO] Running command /bin/su webapp -c npm --omit=dev install
2023/08/14 12:14:00.148235 [INFO] 
added 379 packages, and audited 380 packages in 11s

24 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

web.stdout.log

Aug 14 12:14:10 ip-172-31-33-13 web: > users-api@0.0.1 start
Aug 14 12:14:10 ip-172-31-33-13 web: > npm run build && npm run start:prod
Aug 14 12:14:10 ip-172-31-33-13 web: > users-api@0.0.1 build
Aug 14 12:14:10 ip-172-31-33-13 web: > nest build
Aug 14 12:14:10 ip-172-31-33-13 web: sh: nest: command not found

I don't understand. That exact same build was successfully deployed on Vercel and is working just fine there. So what's wrong with my EBS environment here?

Mickael
質問済み 9ヶ月前242ビュー
1回答
0
承認された回答

Ok so the problem was that NestJS needs the CLI to be in the dependencies to work. And it was only in the devDependencies. How it could possibly work on Vercel (even though the install command omits dev there too), I have no idea...

Mickael
回答済み 9ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ