Workaround to build and install SAP Commerce, Composable Storefront >5.0 on Windows - '..' is not recognized as an internal or external command

37 views Asked by At

During the local build and installation of "SAP Composable Storefront" on my Windows computer, following the video of Mateusz Ostafil (Youtube Link How to build and install SAP Commerce, Composable Storefront 6.0 (SAP Spartacus 6.0))

I ran into the error mentioned in the comments:

[build:schematics] 
[build:schematics] > [email protected] build:schematics
[build:schematics] > npm --prefix projects/schematics run build
[build:schematics]
[build:user] 
[build:user] > [email protected] build:user
[build:user] > npm --prefix feature-libs/user run build:schematics && ng build user --configuration production
[build:user]
[build:schematics] 
[build:schematics] > @spartacus/[email protected] build
[build:schematics] > npm run clean && npm --prefix ../../ run generate:deps && ../../node_modules/.bin/tsc -p ./tsconfig.schematics.json    
[build:schematics]
[build:user]
[build:user] > @spartacus/[email protected] build:schematics
[build:user] > npm run clean:schematics && ../../node_modules/.bin/tsc -p ./tsconfig.schematics.json
[build:user]
[build:schematics] 
[build:schematics] > @spartacus/[email protected] clean
[build:schematics] > ../../node_modules/.bin/rimraf "index.js*" "index.d.ts" "src/**/*.js" "src/**/*.js.map" "src/**/*.d.ts"
[build:schematics]
[build:user]
[build:user] > @spartacus/[email protected] clean:schematics
[build:user] > ../../node_modules/.bin/rimraf "schematics/**/*.js" "schematics/**/*.js.map" "schematics/**/*.d.ts"
[build:user]
[build:schematics] '..' is not recognized as an internal or external command,
[build:schematics] operable program or batch file.
[build:user] '..' is not recognized as an internal or external command,
[build:user] operable program or batch file.
[build:schematics] npm run build:schematics exited with code 1
--> Sending SIGTERM to other processes..
[build:user] npm run build:user exited with code 1
error Command failed with exit code 1.

I found an alternative solution to the problem, since Windows does not recognize the "/" in the paths of the different package.json files, so in the files of each library I replaced the slash "/" with: "\".

This allows the libraries to be built using the yarn build:libs or npm run build:libs command.

Example image of how the replaced "/" look: screenshot asm modified package.json

If anyone knows any other solution or a better alternative, don't hesitate to leave it in the comments.

0

There are 0 answers