on 04-30-2021 2:42 PM
Hello,
I'm using the Shims to include 3rd party libraries as describe here Project Shims – Using NPM modules with UI5 | SAP Blogs . When doing my build & testing locally it's working fine (shims specified in ui5.yaml is correctly executed) ! However when deploying, i got the following error during deployment phase
Source contains multiple documents; please use YAML.parseAllDocuments()
Could you give a hand ? See my ui5-deploy.yaml files and npm script link to it.
Thanks
Aurélien
"deploy": "ui5 build -a preload --clean-dest --config ui5-deploy.yaml --include-task=generateManifestBundle generateCachebusterInfo",
I faced the same problem. As a workaround until this get fixed you can modify the function getUI5Theme (line 72344 in version 1.2.0) in the file node_modules/@sap/ux-ui5-tooling/dist/tasks/deploy/index.js to the following:
async function getUI5Theme(root) {
const yamlFile = path_1.default.join(root, 'ui5-deploy.yaml');
if (await fileExists(yamlFile)) {
const yamlDocs = yaml_1.default.parseAllDocuments(await readLocalFile(yamlFile));
const doc = yamlDocs.find((doc) => {
const yamlContent = doc.toJSON();
return yamlContent.ui5Theme;
});
return doc ? doc.toJSON().ui5Theme : undefined;
}
}
This at least works for me. Keep in mind that any update to @sap/ux-ui5-tooling will revert your changes.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is it possible for you to show how you are making use of XLSX in project?
Also below is my sample code which is working. Your code looks vary familiar to this.
---
specVersion: '2.1'
kind: extension
type: project-shim
metadata:
name: external # this can be your project shim name
shims:
configurations:
xlsx: # name as defined in package.json
specVersion: '2.1'
type: module # Use module type
metadata:
name: xlsx
resources:
configuration:
paths:
/resources/external/xlsx/: 'dist'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sure, here it is
sap.ui.define(
[
'./BaseController',
'../model/formatter',
'../util/ErrorHandler',
'sap/ui/core/message/Message',
'sap/ui/core/MessageType',
'sap/m/MessageBox',
'../lib/thirdparty/xlsxdist/xlsx.full.min',
'../lib/thirdparty/xlsxdist/jszip',
],
function (BaseController, formatter, ErrorHandler, Message, MessageType, MessageBox) {
...
Well.. not really. Actually the code works perfectly, i can use the library in my code without issues. The problem is when i want to deploy to the abap server, it's rebuilding the project correct but then when executing task "deploy-to-abap" it gives that error message and stop the process...
Source contains multiple documents; please use YAML.parseAllDocuments()
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.