Chris V
10/02/2021, 10:34 AMyarn
for installing and building, whereas Elastic Beanstalk installs with npm
. I updated the CodeBuild step to also use npm
and things seem to be working 🤞 Still interesting to note that Prisma v2 worked fine the whole time.
I'm having trouble deploying Prisma to Elastic Beanstalk - I am able to deploy Prisma at version 2, but not at version 3.
When using prisma
and @prisma/client
at version 3, the Elastic Beanstalk npm --production install
command fails but with no obvious error message - I will leave the full logs as a reply to this message.
Any ideas what might cause this? As I say, if I downgrade to version 2 then the deployment works fine. I have also tried running npm --production install
locally with the same version of Node used in the EB build, and it also works fine.Chris V
10/02/2021, 10:35 AM2021/10/02 10:28:50.684707 [INFO] Running command /bin/sh -c npm --production install
2021/10/02 10:29:20.316492 [INFO]
> prisma@3.1.1 preinstall /var/app/staging/node_modules/prisma
> node scripts/preinstall-entry.js
> prisma@3.1.1 install /var/app/staging/node_modules/prisma
> node scripts/install-entry.js
> @prisma/engines@3.1.0-24.c22652b7e418506fab23052d569b85d3aec4883f postinstall /var/app/staging/node_modules/@prisma/engines
> node download/index.js
> core-js-pure@3.18.1 postinstall /var/app/staging/node_modules/core-js-pure
> node -e "try{require('./postinstall')}catch(e){}"
[96mThank you for using core-js ([94m <https://github.com/zloirock/core-js> [96m) for polyfilling JavaScript standard library![0m
[96mThe project needs your help! Please consider supporting of core-js:[0m
[96m>[94m <https://opencollective.com/core-js> [0m
[96m>[94m <https://patreon.com/zloirock> [0m
[96m>[94m <https://paypal.me/zloirock> [0m
[96m>[94m bitcoin: bc1qlea7544qtsmj2rayg0lthvza9fau63ux0fstcz [0m
[96mAlso, the author of core-js ([94m <https://github.com/zloirock> [96m) is looking for a good job -)[0m
> @apollo/protobufjs@1.2.2 postinstall /var/app/staging/node_modules/@apollo/protobufjs
> node scripts/postinstall
> @prisma/client@3.1.1 postinstall /var/app/staging/node_modules/@prisma/client
> node scripts/postinstall.js
Prisma schema loaded from prisma/schema.prisma
âœ" Generated Prisma Client (3.1.1) to ./node_modules/@prisma/client in 3.42s
You can now start using Prisma Client in your code. Reference: <https://pris.ly/d/client>
import { PrismaClient } from '@prisma/client'
const prisma = new PrismaClient()
2021/10/02 10:29:20.320079 [ERROR] An error occurred during execution of command [app-deploy] - [Use NPM to install dependencies]. Stop running the command. Error: Command /bin/sh -c npm --production install failed with error signal: killed
2021/10/02 10:29:20.320101 [INFO] Executing cleanup logic
2021/10/02 10:29:20.346476 [INFO] CommandService Response: {"status":"FAILURE","api_version":"1.0","results":[{"status":"FAILURE","msg":"Engine execution has encountered an error.","returncode":1,"events":[{"msg":"Instance deployment: 'npm' failed to install dependencies that you defined in 'package.json'. For details, see 'eb-engine.log'. The deployment failed.","timestamp":1633170560,"severity":"ERROR"},{"msg":"Instance deployment failed. For details, see 'eb-engine.log'.","timestamp":1633170560,"severity":"ERROR"}]}]}
Ryan
10/04/2021, 5:33 AMChris V
10/04/2021, 7:01 AMRyan
10/04/2021, 7:06 AMChris V
10/06/2021, 1:50 AM