ui5-tooling
ui5-tooling copied to clipboard
ui5 use error expecting manifest.json to already be present
Hi all
I'm having on issue with this on Windows 10, using Powershell or CMD. It won't set up a ui5 project for me, always fails with the following error, as it seems to expect a manifest.json already (which it's supposed to set up):
Error Message: Failed to read manifest.json for project ui5-test: ENOENT: no such file or directory, open 'C:\Users\USER\git\ui5-test\webapp\manifest.json'
Expected Behavior
set up an initial UI5 project by using ui5 init and ui5 use openui5@latest
Current Behavior
ui5 init fails with the message:
Error Message: Could not detect project type: Could not find 'webapp' or 'src' / 'test' folders. Applications should only have a 'webapp' folder. Libraries should only have a 'src' and (optional) 'test' folder.
If I create the folder "webapp" manually, then run ui5 use openui5@latest, I get the error
Error Message: Failed to read manifest.json for project ui5-test: ENOENT: no such file or directory, open 'C:\Users\USER\git\ui5-test\webapp\manifest.json'
Steps to reproduce the issue
- mkdir ui5-test
- cd ui5-test
- npm init -y
- ui5 init
- mkdir webapp
- ui5 use openui5@latest OR ui5 use sapui5@latest
Context
- UI5 Module Version (output of
ui5 --version
when using the CLI):2.0.2
- Node.js Version:
v12.13.1
- npm Version:
6.14.4
- OS/Platform:
Windows 10
- Browser (if relevant):
{...}
- Other information:
Powershell 7 or CMD
Affected components (if known)
- [ ] ui5-builder
- [ ] ui5-server
- [X] ui5-cli
- [ ] ui5-fs
- [ ] ui5-project
- [ ] ui5-logger
Log Output / Stack Trace
{...}
Hey, sorry for the late reply.
Apparently this works as designed. We always need the projects namespace information, which is located in the manifest.json.
In the future, project setup should become easier with the use of scaffolding. Until then we should definitely improve this error message. Thanks for reporting!
Hi
thank you for the reply - I've since also come to this conclusion, apparently projects should be initialised in the WebIDE first and then downloaded to the local environment. In my opinion this limits access for people who don't have access to the WebIDE. While scaffolding would be nice, I understand that it takes time, so in the meantime maybe you could provide additional documentation about the manual steps we need to take to get this to work, i.e. what directories need to be created and a minimal manifest.json file that's required. That way it could still be used locally, albeit with some additional setup.
Thank you Akos
@szalayak you might find this guide interesting. Also, thanks for confirming I am not the only one having this issue.
Why can't you just provide a minimal manifest.json and update your "getting started" tutorial?
I do not know how to proceed otherwise. I can use yo easy-ui5 but I am completely overwhelmed by its complexity, as you have to preselect many options.
@Jogala's comment is also related to https://github.com/SAP/openui5/issues/3306
wow, more than 2 years passed and we still there.
ui5 -v
3.6.1 (from /opt/homebrew/lib/node_modules/@ui5/cli/bin/ui5.cjs)
With the next UI5 CLI release, the error messages for ui5 init
, and when a manifest.json
is missing, will also mention the Getting Started - Starting a New Project documentation page, which should help creating a new project.
As already stated, ui5 init
does currently not cover a complete scaffolding/initialization of a UI5 project.
It only covers the initialization of UI5 Tooling related things like creating a ui5.yaml
file.