btp-cap-multitenant-saas icon indicating copy to clipboard operation
btp-cap-multitenant-saas copied to clipboard

When trying to build on widnows

Open laberge1234 opened this issue 1 year ago • 8 comments

There is an error when trying to build from windows only for api & srv images using main branch

image

laberge1234 avatar Apr 11 '24 20:04 laberge1234

Hi @laberge1234,

Could you please provide a bit more info.?

  • Are you trying to build only srv and api?
  • Can you tell us the command you are using to build?
  • Is docker running on your system? and what is the version?
  • could you also provide your npm and cds version?

Regards, Ajit

AjitKP91 avatar Apr 12 '24 04:04 AjitKP91

Yes it is all running !

"build:srv": "cross-env-shell pack build $IMAGE_PREFIX/susaas-srv --path ../../code/gen/srv --builder paketobuildpacks/builder:base --buildpack gcr.io/paketo-buildpacks/nodejs -e BP_LAUNCHPOINT=./node_modules/@sap/cds/bin/cds-serve.js",
"build:api": "cross-env-shell pack build $IMAGE_PREFIX/susaas-api --path ../../code/gen/api --builder paketobuildpacks/builder:base --buildpack gcr.io/paketo-buildpacks/nodejs -e BP_LAUNCHPOINT=./node_modules/@sap/cds/bin/cds-serve.js",

I run : npm run build:srv and npm run build:api The other image are building fine The issue is happening inside the container while building, on my computer. I can run it localy it builds fine. there is a difference between the npm local commands and the build flow with the pack command.

I tryed with most recent version of node 20 and node 18 LTS.

@cap-js/cds-types: 0.2.0 @sap/cds: 7.8.0 @sap/cds-compiler: 4.8.0 @sap/cds-dk (global): 7.8.0 @sap/cds-fiori: 1.2.3 @sap/cds-foss: 5.0.0 @sap/cds-mtxs: 1.17.0 @sap/eslint-plugin-cds: 2.6.7 Node.js: v20.12.2

ghost avatar Apr 12 '24 04:04 ghost

@laberge1234 Thanks for providing detaills.

AjitKP91 avatar Apr 12 '24 05:04 AjitKP91

@laberge1234

I think you are missing some installations like paketo or helm etc on your local machine Can you make sure you have all the required installations (especially paketo, helm, docker) as provided in following tutorial: https://developers.sap.com/tutorials/btp-app-kyma-prepare-dev-environment.html

AjitKP91 avatar Apr 12 '24 06:04 AjitKP91

No I was able to build this one : build:db-com It uses all the dependencies on your link. This builder : --builder paketobuildpacks/builder:base does not work with the project.

ghost avatar Apr 12 '24 06:04 ghost

Can you try paketobuildpacks/builder-jammy-base builder?

alperdedeoglu avatar Apr 12 '24 08:04 alperdedeoglu

Yes I also tried this image ! Deleting node _module and packacge.lock

ghost avatar Apr 12 '24 12:04 ghost

I do not currently have a windows machine, we need to check this with a colleague who has it.

Will update here.

alperdedeoglu avatar Apr 12 '24 13:04 alperdedeoglu

Hi @laberge1234, I could not reproduce this, do you have access to the SAP Business Application Studio? Can you check if the build and deploy works there for you?

alperdedeoglu avatar Apr 30 '24 12:04 alperdedeoglu

Thank you your last commit allowed me to build. I probably forgot to delete a package.lock in a directory somewhere. This was the root cause of the problem.

thomaslaberge avatar May 03 '24 14:05 thomaslaberge

Great to hear, thank you for adopting the repo and keep us updated if you find any other issues. We sincerely appreciate your contribution!

alperdedeoglu avatar May 04 '24 20:05 alperdedeoglu