Closed TheGreenToaster closed 3 years ago
Also entered SAP/ui5-cli#3
+1. We already have a verbose log "No manifest found for project ${project.metadata.name}. This might be an error in the future!"
. We definitely require a namespace for all applications, plus we'd like to enforce the presence of a manifest.json
file for new apps.
So, to be compatible with existing apps, we could do the following:
manifest.json
ui5.yaml
(metadata.namespace
)=> If unable to determine namespace, throw error => If a namespace is present in both sources, throw error
manifest.json
should always be the preferred source, so the ui5.yaml
option should go undocumented until more people complain that they don't want to add a manifest.json
to their app.
Thanks for reporting!
In version 2.x of the UI5 Tooling we added additional checks and always require a project namespace now. Therefore closing this issue.
Expected Behavior
After running
ui5 init
the project should be able to build the projectCurrent Behavior
After running
ui5 init
the build fails because there is nometadata.namespace
property in theui5.yaml
file.Steps to reproduce the issue
ui5 init
ui5 build
Error: Resource Component-preload.js has no content
Context
Affected components
Resolution
Perhaps the namespace could be read from the
sap.app.id
in themanifest.json
file if it exists. If it does not exist then output warning the user or even a prompt for input might be acceptable? Also in the build perhaps a check could be performed if the namespace field exists and throws a meaningful error in its absence.