cancel
Showing results for 
Search instead for 
Did you mean: 

Where CAP fiori links are gone?

0 Kudos

I am running a CAP Nodejs application and its generating for me Fiori links for data management.

Today when i tried to re-upload new version for the app, all the fiori links are gone! and direct link doesnt work!!!! (Localy everithing works fine)

What is happening?

Attached old version of with the fiori link:

Accepted Solutions (1)

Accepted Solutions (1)

chgeo
Advisor
Advisor
0 Kudos

Indeed, Fiori preview now by default only runs in development mode, i.e. when NODE_ENV != production, which is true locally. When deployed to a cloud environment, the preview feature is switched off (due to NODE_ENV==production). It has always been a dev helper tool rather than a productive feature. Do not rely on its capabilities in productive applications.

If you want to get it back, either set NODE_ENV != production in your deploy manifest (env variable), or set `cds.features.fiori_preview` to `true`.

Hope this helps

0 Kudos

Thanks!

But where and how can I set "cds.features.fiori_preview : true"?

Solved!

UPDATE:

"cds": {
    "features": {
      "fiori_preview": true
    }
}
chgeo
Advisor
Advisor
0 Kudos

Typically in your package.json with

"cds": {
"features": { "fiori_preview": true }
}

If you have a second srv/package.json, then do it there.

We will soon publish a doc page that describes that.

iwona_hahn
Product and Topic Expert
Product and Topic Expert
0 Kudos

Find here the updated documentation.

Answers (1)

Answers (1)

gregorw
Active Contributor
0 Kudos

Have you tried:

export NODE_ENV=production
cds run

locally? Seems that the links now depend on this variable.

0 Kudos

What do you mean? Where should i run it? i run it in command line, no change.

gregorw
Active Contributor
0 Kudos

When you're on Windows you have to use

set NODE_ENV=production
cds run

Have a look at the CHANGELOG.md#version-450---2021-02-01