cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

cds deploy –-to hana: Error: no service definition found

todd_fisher
Product and Topic Expert
Product and Topic Expert
3,365

Tutorials: https://developers.sap.com/tutorials/cap-extend-sfsf-deploy-hc.html
--------------------------

When I reach the step to deploy the hdb via "cds deploy –-to hana" i get the error "Error: no service definition found; there must be at least one service definition for the deployment target"

Note:

- using BAS from trial account

- When I execute "cds add hana" my package.json shows dependencies.hdb = "^0.19.0" and db.kind = "hana-cloud" (attached)package-json.txtterminal.txt

thanks

View Entire Topic
lothar_bender
Product and Topic Expert
Product and Topic Expert
0 Kudos

The error is returned by the HDI deployer - the term service refers to the HANA database service instance.

You may want to check whether your project contains an outdated `default-env.json` or `.env` file referring to a HANA service that does no longer exist. Also make sure the database is up and running and properly configured as described in the tutorial.

Note: on trial accounts everything (including SAP HANA database) shuts down overnight!

baris61
Explorer
0 Kudos

Hello Bender,

I 'm having the same problem. I followed the steps as you said.
SAP Tutorial: https://developers.sap.com/tutorials/hana-cloud-deploying.html

This code "cds deploy –to hana" is not completed. Throwing errors at me;

<code>[deploy] - Deployment ended at 2023-03-31 08:37:27

[deploy] - Error: no service definition found; there must be at least one service definition for the deployment target

[deploy] - (0s 195ms)


/home/user/projects/sfsf-projman/node_modules/@sap/cds/bin/deploy/to-hana/hdiDeployUtil.js:142
                    return reject(new Error(message));
                                  ^

Error: HDI deployment failed with exit code 1
    at /home/user/projects/sfsf-projman/node_modules/@sap/cds/bin/deploy/to-hana/hdiDeployUtil.js:142:35
    at ChildProcess.<anonymous> (/home/user/projects/sfsf-projman/gen/db/node_modules/@sap/hdi-deploy/library.js:102:14)
    at ChildProcess.emit (node:events:513:28)
    at maybeClose (node:internal/child_process:1100:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)

I created Hana db and db is running.



My Package.json

Why am I getting errors. Can you help me?

Best Regards,

Baris

lothar_bender
Product and Topic Expert
Product and Topic Expert

Hi Baris,
you may want to check whether your project contains an outdated `default-env.json` or `.env` file referring to a HANA service that does not longer exist.

Regards, Lothar