error 1
(node:28340) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'customMiddleware' of undefined
at handleABAP (C:\Code\UI5\Walkthrough\35\node_modules\@sap\ux-ui5-tooling\dist\cli\cmd\add-deploy-config.js:113:29)
Cause of error: The version of Fiori tools CLI used is too low.
"@sap/ux-ui5-tooling": "1.0.10"
https://www.npmjs.com/package/@sap/ux-ui5-tooling
Workaround: Use the latest 1.4.7
version:
error message 2
Error: Cannot find proxy middleware config in [C:\Code\UI5\Walkthrough\35\ui5.yaml]
at f (C:\app\node-v12.18.3-win-x64\node_modules\@sap\generator-fiori\generators\deployment-generator\abap\index.js:2:616172)
at Object.r.handleErrorMessage (C:\app\node-v12.18.3-win-x64\node_modules\@sap\generator-fiori\generators\deployment-generator\abap\index.js:2:616358)
Error reason: The content of the ui5.yaml file is incomplete.
At least the fiori-tools-proxy
area should be included.
Refer to a properly formatted ui5.yaml
:
specVersion: '1.0'
metadata:
name: 'project1'
type: application
ui5Theme: sap_fiori_3
server:
customMiddleware:
- name: fiori-tools-proxy
afterMiddleware: compression
configuration:
ignoreCertError: false # If set to true, certificate errors will be ignored. E.g. self-signed certificates will be accepted
backend:
- path: /sap/opu/odata
url: http://localhost
ui5:
path:
- /resources
- /test-resources
url: https://ui5.sap.com
version: # The UI5 version, for instance, 1.78.1. Empty means latest version
- name: fiori-tools-appreload
afterMiddleware: compression
configuration:
port: 35729
path: webapp
error message 3
info builder:custom deploy-to-abap Create Archive
info builder:custom deploy-to-abap Starting Deployment.on project1 � (11/11) Running task deploy-to-abap...
WARN builder:custom deploy-to-abap Connecting without any credentials, deployment may fail if authorization is required
ERR! builder:custom deploy-to-abap Deployment Failed.tion project1 � (11/11) Running task deploy-to-abap...
ERR! builder:custom deploy-to-abap getaddrinfo ENOTFOUND aa
The reason is that the deploy-to-abap
of the custom task target
in the ui5-deploy.yaml
file, that is, the url maintenance of the remote ABAP system is incorrect.
If you see the prompt message shown above:
The deployment destination requires authentication. Please enter your credentials below
? Username:
Indicates that the ABAP system is successfully connected.
error message 4
Upload canceled, archive could not be read or appears to be empty
The error message is the same as described in this post .
This error is related to version SAP UI5 tools
.
For the SAP generator-easy-ui5
project created with SAP UI5 tools
, the default version number of 0621b7ce01123e is as shown below:
"devDependencies": {
"@ui5/cli": "^2.11.1",
"@ui5/fs": "^2.0.6",
"@ui5/logger": "^2.0.1",
"@sap/ux-ui5-tooling": "1",
"rimraf": "3.0.2"
},
"ui5": {
"dependencies": [
"@sap/ux-ui5-tooling"
]
}
Solution: delete package-lock.json
file and node_modules
folder,
Execute the command line to install the latest version:
npm install @sap/ux-ui5-tooling@latest
Successfully installed version number: 1.4.7
Change the deploy
script command in the package.json
file to:
npm run build && fiori deploy --config ui5-deploy.yaml
Just re-execute npm run deploy
:
error message 5
Remote creation in customer namespace not possible in SAP systems
The solution is to manually create the BSP application in the ABAP system ER9 in advance:
For another method, refer to this link .
More Jerry's original articles, all in: "Wang Zixi":
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。