ui5-tooling icon indicating copy to clipboard operation
ui5-tooling copied to clipboard

ui5 use error expecting manifest.json to already be present

Open szalayak opened this issue 4 years ago • 5 comments

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

  1. mkdir ui5-test
  2. cd ui5-test
  3. npm init -y
  4. ui5 init
  5. mkdir webapp
  6. 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)

Log Output / Stack Trace

{...}

szalayak avatar Apr 07 '20 14:04 szalayak

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!

RandomByte avatar Apr 20 '20 15:04 RandomByte

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 avatar Apr 20 '20 16:04 szalayak

@szalayak you might find this guide interesting. Also, thanks for confirming I am not the only one having this issue.

AndreaBorgia-Abo avatar Jun 11 '20 09:06 AndreaBorgia-Abo

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 avatar Jul 22 '21 14:07 Jogala

@Jogala's comment is also related to https://github.com/SAP/openui5/issues/3306

codeworrior avatar Jul 23 '21 09:07 codeworrior

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)
CleanShot 2023-10-02 at 21 31 34@2x

bora89 avatar Oct 02 '23 18:10 bora89

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.

matz3 avatar Oct 30 '23 09:10 matz3