'SAP Commerce Cloud 2105 Installation on MAC OS Build Error: The command failed with exit code 127
I'm trying to setup SAP Commerce Cloud v2105 project in my MAC OS machine for Spartacus development. I'm using this guide: https://sap.github.io/spartacus-docs/installing-sap-commerce-cloud-2105/
So far I have installed the pre-requisites:
JDK 11 => soon changed it to SAP Machine JDK 11 based on this: SAP Commerce Cloud with Spartacus installation error
NodeJS version 12
Angular CLI version 10
Setup JAVA_HOME
Everything is going well until i got this error while running the command:
./install.sh -r cx-for-spa initialize
Error
> Task :recipes:cx-for-spa:buildSystem FAILED
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/programmer/Documents/projects/commercloud/installer/recipes/cx-for-spa/build.gradle' line: 604
* What went wrong:
Execution failed for task ':recipes:cx-for-spa:buildSystem'.
> external process returned non-zero exit code, command: [sh, -c, export PLATFORM_HOME="/Users/programmer/Documents/projects/commercloud/hybris/bin/platform" && export ANT_OPTS="-Xmx1024m -Dfile.encoding=UTF-8" && export ANT_HOME="/Users/programmer/Documents/projects/commercloud/hybris/bin/platform/apache-ant" && chmod +x "/Users/programmer/Documents/projects/commercloud/hybris/bin/platform/apache-ant/bin/ant" && export PATH="$ANT_HOME/bin:$PATH" && ant clean all]
Stacktrace
[exec]
[exec]
[exec] Running "pnpm install" in /Users/programmer/Documents/projects/commercloud/hybris/bin/modules/smartedit/smartedittools/common/temp
[exec]
[exec]
[exec] The command failed:
[exec] /Users/programmer/Documents/projects/commercloud/hybris/bin/modules/smartedit/smartedittools/common/temp/pnpm-local/node_modules/.bin/pnpm install --no-prefer-frozen-lockfile --strict-peer-dependencies
[exec] ERROR: Error: The command failed with exit code 127
[exec]
[exec] Trying again (attempt #2)...
[exec]
[exec] Deleting the "node_modules" folder
[exec]
[exec] The command failed:
[exec] /Users/programmer/Documents/projects/commercloud/hybris/bin/modules/smartedit/smartedittools/common/temp/pnpm-local/node_modules/.bin/pnpm install --no-prefer-frozen-lockfile --strict-peer-dependencies
[exec] ERROR: Error: The command failed with exit code 127
[exec]
[exec] Trying again (attempt #3)...
[exec]
[exec] Deleting the "node_modules" folder
[exec]
[exec] The command failed:
[exec] /Users/programmer/Documents/projects/commercloud/hybris/bin/modules/smartedit/smartedittools/common/temp/pnpm-local/node_modules/.bin/pnpm install --no-prefer-frozen-lockfile --strict-peer-dependencies
[exec] ERROR: Error: The command failed with exit code 127
[exec]
[exec] /bin/sh: /Users/programmer/Documents/projects/commercloud/hybris/bin/modules/smartedit/smartedittools/common/temp/pnpm-local/node_modules/.bin/pnpm: No such file or directory
[exec] /bin/sh: /Users/programmer/Documents/projects/commercloud/hybris/bin/modules/smartedit/smartedittools/common/temp/pnpm-local/node_modules/.bin/pnpm: No such file or directory
[exec] /bin/sh: /Users/programmer/Documents/projects/commercloud/hybris/bin/modules/smartedit/smartedittools/common/temp/pnpm-local/node_modules/.bin/pnpm: No such file or directory
[exec] Giving up after 3 attempts
[exec]
[exec]
[exec] ERROR: The command failed with exit code 127
[exec]
What I tried to far
Solution #1 - removed NodeJS and NPM and redid everything
Reference: https://answers.sap.com/questions/12762725/hybris-63-sapaomsomb2bb2c-ant-clean-all-error.html?childToView=12794099 - DIDN'T WORK
Solution #2 - manually removed node_modules on the pnpm directory, but only shortcut found and no node_modules folder found
Solution #3 - reinstalled Angular CLI - DIDN'T WORK
Solution #4 - This solution => SAP Commerce Cloud with Spartacus installation error - DIDN'T WORK
Solution #5 - commented out all extensions related to smartedit on the build.gradle file - DIDN'T WORK
Solution #6 - Uninstalled Visual Studio code as it might cause conflict - DIDN'T WORK
Solution #7 - Commented the build parallel flag
Reference: Build failed.Step 2: Build and initialize the new recipe. Initialize the system - DIDN'T WORK
Just asking here, there might be people out there who experienced the same issues.
Solution 1:[1]
Try this:
Change the pnpm version to 5.18.10 on "bin\modules\smartedit\smartedittools\common\config\rush.tpl.json"; Delete .pnpm-store under your Windows $HOME; Trigger commerce build
Solution 2:[2]
The problem in your setup is that you are missing some pre-reqs for SmartEdit extensions.
Try running ant npminstall
to enable full build
(https://help.sap.com/docs/SAP_COMMERCE/9d346683b0084da2938be8a285c0c27a/6d55d5fba206425b9acecda9f2311483.html?version=1905&locale=en-US)
But, I suggest you to not include smartedit extensions in local env.
I am using, also, a SAP Commerce 2105 with Spartacus, and I am injecting Smartedit extensions only at cloud envs.
I think SmartEdit is really heavy to include at local envs.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | acostamo |
Solution 2 | Fabio Elias Filpi |