Getting error during NORMAL pipeline deployment on AWS Server (Codepipeline)
Hello Team, I'm getting this type of error during Build_and_prepare section on AWS codebuild stage so here's the logs for this :
#*2 **8.9#*2 8.9 Section build-static-elopment#*2 8.9#2 8.9
#*2 8.9 Command yves-build-frontend [vendor/bin/console frontend:yves:build]
#2 8.9 --------------------------------------------------------------------------------
#*2 8.9
#*2 9. Store: US | Code bucket: EU | Environment: ***
#2 **9.8 Build Yves frontend
#2 2.
#2 2. > **-b2b-demo-shop@.. yves
#2 2. > node ./frontend/build elopment
#2 2.
#2 2. node:internal/modules/cjs/loader:3
#2 2. throw err;
#2 2. ^
#2 2.
#2 2. Error: Cannot find module 'commander'
#2 2. Require stack:
#2 2. - /data/frontend/libs/command-line-parser.js
#2 2. - /data/frontend/build.js
#2 2. at Function.Module._resolveFilename (node:internal/modules/cjs/loader:28:5)
#2 2. at Function.Module._load (node:internal/modules/cjs/loader:873:27)
#2 2. at Module.require (node:internal/modules/cjs/loader::9)
#2 2. at require (node:internal/modules/cjs/helpers:9:8)
#2 2. at Object.<anonymous> (/data/frontend/libs/command-line-parser.js::27)
#2 2. at Module._compile (node:internal/modules/cjs/loader:98:*4)
#2 2. at Object.Module._extensions..js (node:internal/modules/cjs/loader:*252:)
#2 2. at Module.load (node:internal/modules/cjs/loader:76:32)
#2 2. at Function.Module._load (node:internal/modules/cjs/loader:9:2)
#2 2. at Module.require (node:internal/modules/cjs/loader::*9) {
#2 2. code: 'MODULE_NOT_FOUND',
#2 2. requireStack: [
#2 2. '/data/frontend/libs/command-line-parser.js',
#2 2. '/data/frontend/build.js'
#2 2. ]
#2 2. }
#*2 2.3
#*2 2.3 In CommandLineExecutable.php line 8:
#*2 2.3#*2 2.3 [Spryker\Zed\Install\Business\Exception\InstallException]#*2 2.3 Aborted install...#*2 2.3#*2 2.3
#*2 2.3 Exception trace:
#2 2.3 at /data/vendor//install/src/Spryker/Zed/Install/Business/Executable/CommandLine/CommandLineExecutable.php:8
#2 2.3 Spryker\Zed\Install\Business\Executable\CommandLine\CommandLineExecutable->abortInstallIfNotAllowedToContinue() at /data/vendor//install/src/Spryker/Zed/Install/Business/Executable/CommandLine/CommandLineExecutable.php:62
#2 2.3 Spryker\Zed\Install\Business\Executable\CommandLine\CommandLineExecutable->execute() at /data/vendor//install/src/Spryker/Zed/Install/Business/Runner/Section/Command/CommandRunner.php:24
#2 2.3 Spryker\Zed\Install\Business\Runner\Section\Command\CommandRunner->executeExecutable() at /data/vendor//install/src/Spryker/Zed/Install/Business/Runner/Section/Command/CommandRunner.php:96
#2 2.3 Spryker\Zed\Install\Business\Runner\Section\Command\CommandRunner->runCommand() at /data/vendor//install/src/Spryker/Zed/Install/Business/Runner/Section/Command/CommandRunner.php:6
#2 2.3 Spryker\Zed\Install\Business\Runner\Section\Command\CommandRunner->run() at /data/vendor//install/src/Spryker/Zed/Install/Business/Runner/Section/SectionRunner.php:45
#2 2.3 Spryker\Zed\Install\Business\Runner\Section\SectionRunner->run() at /data/vendor//install/src/Spryker/Zed/Install/Business/Runner/InstallRunner.php:23
#2 2.3 Spryker\Zed\Install\Business\Runner\InstallRunner->executeStage() at /data/vendor//install/src/Spryker/Zed/Install/Business/Runner/InstallRunner.php:*47
#2 2.3 Spryker\Zed\Install\Business\Runner\InstallRunner->run() at /data/vendor//install/src/Spryker/Zed/Install/Business/InstallFacade.php:3
#2 2.3 Spryker\Zed\Install\Business\InstallFacade->runInstall() at /data/vendor//install/src/Spryker/Zed/Install/Communication/Console/InstallConsole.php:6
#*2 2.3 Spryker\Zed\Install\Communication\Console\InstallConsole->execute() at /data/vendor/symfony/console/Command/Command.php:326
#*2 2.3 Symfony\Component\Console\Command\Command->run() at /data/vendor/symfony/console/Application.php:63
#2 2.3 Symfony\Component\Console\Application->doRunCommand() at /data/vendor/symfony/console/Application.php:32
#*2 2.3 Symfony\Component\Console\Application->doRun() at /data/vendor/symfony/console/Application.php:*74
#2 2.3 Symfony\Component\Console\Application->run() at /data/vendor//install/bin/install:36
#*2 2.3 include() at /data/vendor/bin/install:**9
#*2 2.3
#*2 2.3 install [-r|--recipe RECIPE] [-d|--dry-run] [-s|--sections SECTIONS] [-g|--groups GROUPS] [-x|--exclude EXCLUDE] [-e|--include-excluded INCLUDE-EXCLUDED] [-i|--interactive] [-b|--breakpoint] [-a|--ask-before-continue] [-l|--log] [--] [<store>]
#*2 2.3
#*2 ERROR: executor failed running [/bin/sh -c echo "BUILD HASH: ${SPRYKER_BUILD_HASH}" && echo "MODE: ${SPRYKER_ASSETS_MODE}" && vendor/bin/install -r ${SPRYKER_PIPELINE} -s build-static -s build-static-${SPRYKER_ASSETS_MODE} -vvv]: exit code: *
[assets-builder 6/6] RUN --mount=type=cache,id=npm,sharing=locked,target=/root/.npm echo "BUILD HASH: **
686676f
a96
5be8c
66c64a2eb89eb7b*83b" && echo "MODE: ***elopment" && vendor/bin/install -r docker -s build-static -s build-static-***elopment -vvv:
executor failed running [/bin/sh -c echo "BUILD HASH: ${SPRYKER_BUILD_HASH}" && echo "MODE: ${SPRYKER_ASSETS_MODE}" && vendor/bin/install -r ${SPRYKER_PIPELINE} -s build-static -s build-static-${SPRYKER_ASSETS_MODE} -vvv]: exit code: *
Failed exporting image
[Container] 2*24/**/*8 *6:23:4.65759 Command did not exit successfully if [ ! -f /tmp/image_exist ]; then
aws ecr get-login-password --region ${REGION} | docker login --username AWS --password-stdin 637423582895.dkr.ecr.${REGION}.amazonaws.com
echo "Desired Image: ${DIRED_IMAGE_TAG}"
./docker/sdk export images -d ecr -t ${DIRED_IMAGE_TAG} && touch /tmp/build_ok || { echo "Failed exporting image" && exit ; }
echo "Exit code: $?"
fi
exit status *
[Container] 224//*8 *6:23:4.672533 Phase complete: BUILD State: FAILED
[Container] 224//*8 *6:23:*4.672572 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: if [ ! -f /tmp/image_exist ]; then
aws ecr get-login-password --region ${REGION} | docker login --username AWS --password-stdin 637423582895.dkr.ecr.${REGION}.amazonaws.com
echo "Desired Image: ${DIRED_IMAGE_TAG}"
./docker/sdk export images -d ecr -t ${DIRED_IMAGE_TAG} && touch /tmp/build_ok || { echo "Failed exporting image" && exit ; }
echo "Exit code: $?"
fi
. Reason: exit status *
[Container] 224//*8 *6:23:*4.746* Entering phase POST_BUILD
[Container] 224//8 6:23:4.749 Running command aws ecr describe-images --repository-name *-pipeline --image-ids imageTag=${DIRED_IMAGE_TAG} && touch /tmp/deploy_cli || { echo "Mandatory repository or image not found" && exit ; }
An error occurred (ImageNotFoundException) when calling the DescribeImages operation: The image with imageId {imageDigest:'', imageTag:'**686676fa965be8c66c64a2eb89eb7b83b'} does not exist within the repository with name '-pipeline' in the registry with id '637423582895'
Mandatory repository or image not found
[Container] 224//8 6:23:5.348889 Command did not exit successfully aws ecr describe-images --repository-name -pipeline --image-ids imageTag=${DIRED_IMAGE_TAG} && touch /tmp/deploy_cli || { echo "Mandatory repository or image not found" && exit ; } exit status *
[Container] 224//8 6:23:5.3544 Running command if [ -f /tmp/build_ok ]; then
echo "The image built and pushed successfully, so the last_build_version parameter should be updated in Parameter Store"
aws ssm put-parameter --name //last_build_version --value=${D**IRED_IMAGE_TAG} --type=String --overwrite
else
echo "Failed to build images!"
fi
Failed to build images!
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 75 Spryker News
- 921 Developer Corner
- 781 Spryker Development
- 88 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 34 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 25 Job Opportunities
- 3.2K 📜 Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random