0

After installing the cx recipe in SAP Commerce, I tried to execute ant clean all but getting following error:

Error: Unable to install package: Error: Unable to determine the path to the NPM tool: Error: Command failed: where npm 'where' is not recognized as an internal or external command, operable program or batch file.

enter image description here

ant clean all should be executed and build should be successful.

Detailed log:

alization-search\\personalizationsearchsmartedit,C:\\Users\\Trainee\\Desktop\\reciepe\\SAP-Commerce-2211-Patch-5\\hybris\\bin\\modules\\personalization-promotion\\personalizationpromotionssmartedit,',
     [exec]   'C:\\Users\\Trainee\\Desktop\\reciepe\\SAP-Commerce-2211-Patch-5\\hybris\\bin\\modules\\smartedit\\smartedittools',
     [exec]   'true'
     [exec] ]
     [exec] Adding npm dependencies to application, path: C:\Users\Trainee\Desktop\reciepe\SAP-Commerce-2211-Patch-5\hybris\bin\modules\smartedit\smartedit\apps\smartedit-master
     [exec] Dependencies:
     [exec] [
     [exec]   { name: 'personalizationcommons', version: '0.0.1' },
     [exec]   { name: 'personalizationsmartedit', version: '0.0.1' },
     [exec]   { name: 'personalizationsmarteditcontainer', version: '0.0.1' },
     [exec]   { name: 'merchandisingsmartedit', version: '0.0.1' },
     [exec]   { name: 'merchandisingsmarteditcommons', version: '0.0.1' },
     [exec]   { name: 'merchandisingsmarteditcontainer', version: '0.0.1' },
     [exec]   { name: '@smart/utils', version: '1.1.52' },
     [exec]   { name: 'smartedit', version: '0.0.1' },
     [exec]   { name: 'smarteditbootstrap', version: '0.0.1' },
     [exec]   { name: 'smarteditcommons', version: '0.0.1' },
     [exec]   { name: 'smarteditcontainer', version: '0.0.1' },
     [exec]   { name: 'smarteditloader', version: '0.0.1' },
     [exec]   { name: 'webappinjector', version: '0.0.1' },
     [exec]   { name: 'personalizationsearchsmartedit', version: '0.0.1' },
     [exec]   { name: 'personalizationsearchsmarteditcontainer', version: '0.0.1' },
     [exec]   { name: 'personalizationpromotionssmartedit', version: '0.0.1' },
     [exec]   {
     [exec]     name: 'personalizationpromotionssmarteditcommons',
     [exec]     version: '0.0.1'
     [exec]   },
     [exec]   {
     [exec]     name: 'personalizationpromotionssmarteditcontainer',
     [exec]     version: '0.0.1'
     [exec]   }
     [exec] ]
     [exec] ****** rush projects ******
     [exec] [
     [exec]   {
     [exec]     packageName: '@smartedit/packagr',
     [exec]     projectFolder: 'apps/smartedit-packagr'
     [exec]   },
     [exec]   {
     [exec]     packageName: '@smartedit/scripts',
     [exec]     projectFolder: 'apps/smartedit-scripts'
     [exec]   },
     [exec]   {
     [exec]     packageName: 'smartedit-build',
     [exec]     projectFolder: 'apps/smartedit-build'
     [exec]   },
     [exec]   {
     [exec]     packageName: '@smart/utils',
     [exec]     projectFolder: '..\\smartedit\\apps\\smart-utils'
     [exec]   },
     [exec]   {
     [exec]     packageName: 'smarteditcommons',
     [exec]     projectFolder: '..\\smartedit\\apps\\smartedit-commons'
     [exec]   },
     [exec]   {
     [exec]     packageName: 'personalizationcommons',
     [exec]     projectFolder: '..\\..\\personalization\\personalizationsmartedit\\apps\\personalizationcommons'
     [exec]   },
     [exec]   {
     [exec]     packageName: 'smartedit',
     [exec]     projectFolder: '..\\smartedit\\apps\\smartedit'
     [exec]   },
     [exec]   {
     [exec]     packageName: 'personalizationsmartedit',
     [exec]     projectFolder: '..\\..\\personalization\\personalizationsmartedit\\apps\\personalizationsmartedit'
     [exec]   },
     [exec]   {
     [exec]     packageName: 'smarteditcontainer',
     [exec]     projectFolder: '..\\smartedit\\apps\\smartedit-container'
     [exec]   },
     [exec]   {
     [exec]     packageName: 'personalizationsmarteditcontainer',
     [exec]     projectFolder: '..\\..\\personalization\\personalizationsmartedit\\apps\\personalizationsmarteditcontainer'
     [exec]   },
     [exec]   {
     [exec]     packageName: 'merchandisingsmarteditcommons',
     [exec]     projectFolder: '..\\..\\cds-merchandising\\merchandisingsmartedit\\apps\\merchandisingsmarteditcommons'
     [exec]   },
     [exec]   {
     [exec]     packageName: 'merchandisingsmartedit',
     [exec]     projectFolder: '..\\..\\cds-merchandising\\merchandisingsmartedit\\apps\\merchandisingsmartedit'
     [exec]   },
     [exec]   {
     [exec]     packageName: 'merchandisingsmarteditcontainer',
     [exec]     projectFolder: '..\\..\\cds-merchandising\\merchandisingsmartedit\\apps\\merchandisingsmarteditContainer'
     [exec]   },
     [exec]   {
     [exec]     packageName: 'smarteditbootstrap',
     [exec]     projectFolder: '..\\smartedit\\apps\\smartedit-bootstrap'
     [exec]   },
     [exec]   {
     [exec]     packageName: 'smarteditloader',
     [exec]     projectFolder: '..\\smartedit\\apps\\smartedit-loader'
     [exec]   },
     [exec]   {
     [exec]     packageName: 'webappinjector',
     [exec]     projectFolder: '..\\smartedit\\apps\\web-app-injector'
     [exec]   },
     [exec]   {
     [exec]     packageName: 'personalizationsearchsmartedit',
     [exec]     projectFolder: '..\\..\\personalization-search\\personalizationsearchsmartedit\\apps\\personalizationsearchsmartedit'
     [exec]   },
     [exec]   {
     [exec]     packageName: 'personalizationsearchsmarteditcontainer',
     [exec]     projectFolder: '..\\..\\personalization-search\\personalizationsearchsmartedit\\apps\\personalizationsearchsmarteditContainer'
     [exec]   },
     [exec]   {
     [exec]     packageName: 'personalizationpromotionssmartedit',
     [exec]     projectFolder: '..\\..\\personalization-promotion\\personalizationpromotionssmartedit\\apps\\personalizationpromotionssmartedit'
     [exec]   },
     [exec]   {
     [exec]     packageName: 'personalizationpromotionssmarteditcommons',
     [exec]     projectFolder: '..\\..\\personalization-promotion\\personalizationpromotionssmartedit\\apps\\personalizationpromotionssmarteditcommons'
     [exec]   },
     [exec]   {
     [exec]     packageName: 'personalizationpromotionssmarteditcontainer',
     [exec]     projectFolder: '..\\..\\personalization-promotion\\personalizationpromotionssmartedit\\apps\\personalizationpromotionssmarteditContainer'
     [exec]   },
     [exec]   {
     [exec]     packageName: 'smarteditmaster',
     [exec]     projectFolder: '..\\smartedit\\apps\\smartedit-master'
     [exec]   }
     [exec] ]
     [echo] check verdaccio.cache: C:\Users\Trainee\Desktop\reciepe\SAP-Commerce-2211-Patch-5\hybris\bin\modules\npm-ancillary\npmancillary\resources\npm\verdaccio\.cache
     [echo] verdaccio.cache is set to: false
     [echo] Running [rush update --bypass-policy] on path C:\Users\Trainee\Desktop\reciepe\SAP-Commerce-2211-Patch-5\hybris\bin\modules\smartedit\smartedittools
     [exec] The rush.json configuration requests Rush version 5.93.1
     [exec] Transforming C:\Users\Trainee\Desktop\reciepe\SAP-Commerce-2211-Patch-5\hybris\bin\modules\smartedit\smartedittools\common\config\rush\.npmrc
     [exec]   --> "C:\Users\Trainee\Desktop\reciepe\SAP-Commerce-2211-Patch-5\hybris\bin\modules\smartedit\smartedittools\common\temp\install-run\@microsoft+rush@5.93.1\.npmrc"
     [exec] Installing @microsoft/rush...
     [exec]
     [exec]
     [exec] Error: Unable to install package: Error: Unable to determine the path to the NPM tool: Error: Command failed: where npm
     [exec] 'where' is not recognized as an internal or external command,
     [exec] operable program or batch file.
Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
  • Are you using any sort of proxy? If that's the case you need to add export NODE_EXTRA_CA_CERTS=/path/to/custom/certificates/RootCA.crt to ~/.bashrc or ~/.zshrc – fredyjimenezrendon Jul 27 '23 at 18:33

1 Answers1

0

I think you should look at the solutions in this link. https://answers.sap.com/questions/13510712/rush-cannot-run-correctly-after-sap-commerce-upgra.html