cancel
Showing results for 
Search instead for 
Did you mean: 

error @sap/fiori:deploy-config when adding Fiori elements

2,554

Hello,

I'm at step 9 (Add SAP Fiori Elements Risks application) of this tutorial: https://developers.sap.com/tutorials/btp-app-launchpad-service.html

I have error when I add add deployment configuration:

BSNC1706_003@DESKTOP-773LOGT MINGW64 /d/교육자료/BTP/CAPapplication/cpapp/app/risks (main)
$ fiori add deploy-config cf
Adding deploy-config to the project.
info Add:Deploy-config Using: @sap/fiori:deploy-config
? Destination name cpapp-app-srv
Error @sap/fiori:deploy-config cf --base ui5.yaml --config ui5-deploy.yaml

could not update the "C:\Users\BSNC17~1\AppData\Local\Temp\d8f8968350936f5f004b82d6bab46db6.temp.mta.yaml" file; it was modified by another process
Do you need to install @sap/generator-fiori globally?
npm install -g @sap/generator-fiori
OR
yarn global add @sap/generator-fiori<br>

and this is the terminal history

BSNC1706_003@DESKTOP-773LOGT MINGW64 /d/교육자료/BTP/CAPapplication/cpapp (main)
$ npm install --global @sap/ux-ui5-tooling
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.

changed 238 packages, and audited 239 packages in 14s

23 packages are looking for funding
  run `npm fund` for details

4 moderate severity vulnerabilities

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.

BSNC1706_003@DESKTOP-773LOGT MINGW64 /d/교육자료/BTP/CAPapplication/cpapp (main)
$ npm install --global @sap/generator-fiori
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm WARN deprecated @sap-cloud-sdk/analytics@1.54.2: 1.x is no longer maintained.
npm WARN deprecated @sap-cloud-sdk/util@1.54.2: 1.x is no longer maintained.
npm WARN deprecated @sap-cloud-sdk/core@1.54.2: Version 1 of SAP Cloud SDK is no longer maintained. Check the upgrade guide for switching to version 2: https://sap.github.io/cloud-sdk/docs/js/guides/upgrade-to-version-2.

changed 622 packages, and audited 631 packages in 51s

97 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

BSNC1706_003@DESKTOP-773LOGT MINGW64 /d/교육자료/BTP/CAPapplication/cpapp (main)
$ npm install --global mta
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm WARN deprecated request-promise@4.2.6: request-promise has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142

changed 68 packages, and audited 69 packages in 11s

2 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

BSNC1706_003@DESKTOP-773LOGT MINGW64 /d/교육자료/BTP/CAPapplication/cpapp (main)
$ cd app/risks

BSNC1706_003@DESKTOP-773LOGT MINGW64 /d/교육자료/BTP/CAPapplication/cpapp/app/risks (main)
$ fiori add deploy-config cf
Adding deploy-config to the project.
info Add:Deploy-config Using: @sap/fiori:deploy-config
? Destination name cpapp-app-srv
Error @sap/fiori:deploy-config cf --base ui5.yaml --config ui5-deploy.yaml

could not update the "C:\Users\BSNC17~1\AppData\Local\Temp\d8f8968350936f5f004b82d6bab46db6.temp.mta.yaml" file; it was modified by another process
Do you need to install @sap/generator-fiori globally?
npm install -g @sap/generator-fiori
OR
yarn global add @sap/generator-fiori

also I share mta.yaml just in case

https://github.com/keg9999/CAPdemo

View Entire Topic
Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi dawonbaek,

You have entered wrong information on your MTA.

1) Make sure you are using NodeJS version 16

2) Duplicate entries for xsuaa resource. On your MTA you a module definition at line 47

And on line 57 you have it again with additional configuration for the same module type.

Recommendation: remove the duplicate entry from line 47

3) Update the requires clause for module 'cpapp-srv' on your MTA.yaml by replacing the deleted instance named 'cpapp-auth' with the instance 'cpapp-uaa'.

4) Then on line 93 you have a module definition of type 'CONTENT' which should be under session 'modules' instead of 'resources'.

Recommendation: Move the module named 'cpapp-destinations' below the session modules and above the session resources on your mta.yaml file.

5) Open the packages.json from both app modules (risks and mititgations) and change the devDependencies with the following:

"devDependencies": {
	"@ui5/cli": "^2.14.9",
	"@ui5/fs": "^2.0.6",
	"@ui5/logger": "^2.0.1",
	"@sap/ux-ui5-tooling": "1",
	"rimraf": "3.0.2",
	"@sap/ux-specification": "latest"
}

Once you have the above changes implemented, you will be able to run the commands from the tutorial without any issues.

Best regards,
Ivan
0 Kudos

Hello Ivan,

I edited mta.yaml and packages.json as you told me so, but I still see the same error.

here I pushed my code with the comment of 'deployment configuration error'

https://github.com/keg9999/CAPdemo

with many thanks,

Dawon

Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert

Hi dawonbaek,

The error message is kind of clear to me 🙂

the "/temp/671a3485a5eeeb4cb35dc1f8d811d954.temp.mta.yaml" file is not a valid MTA descriptor: yaml: line 54: did not find expected '-' indicator

If you open that file, the line 54 has an indentation error. It has a 3-space indentation whereas it should have 4 because it is subordinate to the module 'cpapp-destinations'. My yaml editor has indicated me that this line was expecting a '-' which is correct, since its position is related to a new module declaration and instead it found a and followed by a character (which is the error on your yaml file).

I use the RedHat YAML Editor on my VSCode to prevent such errors while editing yaml:

https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml

Once installed, open the original MTA.yaml file at the root of the project on VSCode and you should see the error like so:

Once you fix the indentation on this module, it should be fixing the issue overall.

If not, please check the repository for this sample application and compare it to what you have currently on your filesystem.

https://github.com/SAP-samples/cloud-cap-risk-management/blob/launchpad-service/mta.yaml

NOTE: the above URL refers to the branch for the same exercise you are on. If you progress on your exercise, you should search for the corresponding branch to lookup the files.

Best regards,
Ivan

SameerAliKhan
Advisor
Advisor

I copied the unformatted mta.yaml, formatted it using 'redhat.vscode-yaml' formatter and then copied it to 'mta.yaml' and the temp '*.yaml', and it was fixed.