cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to Bind SAP BTP Services using CDS BIND

anshuman_s22
Explorer

Hi,

After the recent BAS issue - https://answers.sap.com/questions/13873164/sap-bas-business-application-studio-debugger-not-w.html, I am not able to use "cds bind" to bind to the services that are listed in the subaccount.

Has anyone also faced the same issue?

Please let me know.

Thank you.

View Entire Topic
lothar_bender
Advisor
Advisor
0 Kudos

It seems that you're using a quite old @sap/cds version in your application. Please update to a newer version.

If this does not fix the issue, please add the output of the command

cds -v
anshuman_s22
Explorer
0 Kudos

Hi,

You are right. We are using cds 5.1.5. Unfortunately, upgrading to the latest version of cds is not possible because of regression issues with the views design that we have currently.

This cds bind function worked even before and this was never an issue. Do you see any other possible reason?

Regards,

Anshuman

lothar_bender
Advisor
Advisor
0 Kudos

Please update @sap/cds-dk to version 6.7.1. This should fix the problem and allows for backward compatibility with your existing @sap/cds version.

anshuman_s22
Explorer
0 Kudos

Hi lothar.bender,

We are currently running cds@5.1.5 and cds-dk@4.9.7.

Upgrading to cds-dk@6.7.1 requires cds version to be upgraded as well. But as I already highlighted, we are running into regression issues if the cds version is upgraded.

Also, when we do cds bind, it is trying to fetch the global cds-dk libraries but is not looking for the version defined in the project.

Regards,

Anshuman

lothar_bender
Advisor
Advisor
0 Kudos

Hi Anshuman,

according to the attached logs you are using cds-dk@6.7.0 - maybe by mistake?

Regards, Lothar

anshuman_s22
Explorer
0 Kudos

Hi lothar.bender,

No, it is not by mistake. Somehow when doing `cds bind` it is calling the global node modules installation where it is installed with the version 6.7.0. I tried to install the global version with `npm i -g @sap/cdsk-dk@4.9.7`, but with no luck.

However, `cds bind` did work now with the command -

`cds bind -2 <service>:<key> -o ./.cdsrc-private.json -p development --kind <service_kind>`.

Although, the purpose behind binding was not solved, but I could just solve the binding issue.

Regards,

Anshuman

anshuman_s22
Explorer
0 Kudos

Since the `cds bind` command is working now, I feel the purpose of the thread is complete.

Thank you for your time lothar.bender.

Regards, Anshuman