SAP-samples / btp-cap-multitenant-saas

Sample project that demonstrates how to setup a multitenant application for a Software-as-a-Service scenario, leveraging the Kyma and Cloud Foundry Runtimes of the SAP Business Technology Platform. Developers learn how to implement their own CAP (mtxs) based SaaS app including an SaaS API and integration with various essential SAP BTP service of...
Apache License 2.0
75 stars 38 forks source link

When trying to build on widnows #35

Closed ghost closed 4 months ago

ghost commented 4 months ago

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

image

AjitKP91 commented 4 months ago

Hi @laberge1234,

Could you please provide a bit more info.?

Regards, Ajit

ghost commented 4 months ago

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

AjitKP91 commented 4 months ago

@laberge1234 Thanks for providing detaills.

AjitKP91 commented 4 months ago

@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

ghost commented 4 months ago

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.

alperdedeoglu commented 4 months ago

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

ghost commented 4 months ago

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

alperdedeoglu commented 4 months ago

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

Will update here.

alperdedeoglu commented 4 months ago

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?

thomaslaberge commented 4 months ago

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.

alperdedeoglu commented 4 months ago

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