共计 2518 个字符,预计需要花费 7 分钟才能阅读完成。
谬误 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)
谬误起因:应用的 Fiori tools CLI 版本过低所致。
“@sap/ux-ui5-tooling”: “1.0.10”
https://www.npmjs.com/package…
解决办法:应用最新的 1.4.7
版本:
谬误音讯 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)
谬误起因:ui5.yaml 文件内容不全。
至多应该蕴含 fiori-tools-proxy
区域。
参考一个格局正确的 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
谬误音讯 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
起因是 ui5-deploy.yaml
文件中 deploy-to-abap
这个自定义 task 的 target
, 即远端 ABAP 零碎的 url 保护不正确。
如果看到上图所示的提醒音讯:
The deployment destination requires authentication. Please enter your credentials below
? Username:
阐明 ABAP 零碎连贯胜利。
谬误音讯 4
Upload canceled, archive could not be read or appears to be empty
谬误音讯和这个帖子介绍的统一。
这个谬误和 SAP UI5 tools
的版本无关。
应用 generator-easy-ui5
创立的 SAP UI5 我的项目,SAP UI5 tools
的默认版本号如下图所示:
"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"]
}
解决方案:删除 package-lock.json
文件和 node_modules
文件夹,
执行命令行装置最新版本:
npm install @sap/ux-ui5-tooling@latest
胜利装置的版本号:1.4.7
将 package.json
文件里的 deploy
脚本命令更改为:
npm run build && fiori deploy –config ui5-deploy.yaml
从新执行 npm run deploy
即可:
谬误音讯 5
Remote creation in customer namespace not possible in SAP systems
解决办法是,提前在 ABAP 零碎 ER9 手动创立
好 BSP 利用即可:
另一种办法,参考这个链接。
更多 Jerry 的原创文章,尽在:” 汪子熙 ”: