sap-tutorials / Tutorials

Tutorials on sap.com
https://developers.sap.com/tutorial-navigator.html
Creative Commons Attribution 4.0 International
732 stars 778 forks source link

Create an SAPUI5 App from the Command Line : creation of MTA archive in error #4490

Closed chaouki-akir closed 4 years ago

chaouki-akir commented 4 years ago

Tutorial URL: https://developers.sap.com/tutorials/cp-cf-sapui5-local.html

Hello,

I am following the steps of the above tutorial Step 1-OK-Scaffold a SAPUI5 project (yo easy-ui5) Step 2-OK-Inspect the generated code (cd com.myorg.myUI5App/ code .) Step 3-OK-Test the web-app locally (npm start) Step 4-KO-Package the MTA archive (npm run build:mta)

There is an error in the step 4 when I execute instruction npm run build:mta image

Related issue #4155 4155

IObert commented 4 years ago

Thanks for opening this issue.

It seems like you've done everything right. The only thing that looks a bit strange, is that you created the UI5 app in the system32 folder. Maybe there are some permission errors coming into play here.

Can you please try the following things:

  1. Use the command cd to switch into your home directory and please start over in this directory.
  2. Does the same error occur when you use the Windows command line instead of PowerShell?
  3. Can you update mbt in your project by running npm i mbt after step 2?

These are just guesses at the moment, please let me know if any of these work

chaouki-akir commented 4 years ago

1. I switch into my home directory with PowerShell. I tried the Step 1 yo easy-ui5 and it fails : image

2. I switch into my home directory with Windows command line. I start over and the Steps 1 to 4 are OK now. Step 1-OK-Scaffold a SAPUI5 project (yo easy-ui5) Step 2-OK-Inspect the generated code (cd com.myorg.myUI5App/ code .) Step 3-OK-Test the web-app locally (npm start) Step 4-OK-Package the MTA archive (npm run build:mta)

3. I executed g npm i mbt. And here is the result : image

IObert commented 4 years ago

Thanks for running the tests, I'm glad to see that it worked in scenario 2. I suspect the first one failed because of missing Windows file access rights but my French is too bad to actually understand the error message 😕

I just tested the tutorial in a brand new Windows environment (Azure VM) with PowerShell and I worked there. So it doesn't seem to be an issue with the tutorial or the generator. I rather suspect that the mbt tool has a bug.

I found several people reporting similar issues here . Some of them say it works from the "git terminal" but not from the Windows terminal. I'm afraid I have to ask you one more time to open a new issue at that project, sorry.

PS: You can write SAPDocuments/Tutorials#4490 to reference this issue in a new one on the other project.