cancel
Showing results for 
Search instead for 
Did you mean: 

Format validation failed (Route references unknown destination ...)

zzzonghwa53
Discoverer
0 Kudos

mta.txtxs-app.txtTutorials: https://developers.sap.com/tutorials/hana-cloud-cap-add-authentication.html
--------------------------
when i do 'npm start' in app folder path

------------------------

error ->

jse_shortmsg: 'xs-app.json/routes/0: Format validation failed (Route references unknown destination "srv-api")',

------------------------

please help me...

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

When you run locally, i.e. you are not building and deploying to cloud foundry, content of mta.yaml is irrelevant. Check contents of file default-env.json. You should have an entry in this file for destinations with the destination mentioned in xs-app.json (this is in the tutorial Step 4, bullet 5):

"destinations" : [{
"name" : "srv-api", "url": "https://localhost:4004", "forwardAuthToken":true
}]
goutham2010
Discoverer
0 Kudos

Can you please ping the tutorial link, where should the destination details need to be pasted

 

mariusobert
Developer Advocate
Developer Advocate
0 Kudos

It seems to me that you are mixing "srv-api", "default-url" and "srv-url" here. Have a look at this working sample and try to rebuild the structure used there.

zzzonghwa53
Discoverer

Thanks for your reply.

It was solved by putting default-env.json under the app folder.