SAP/ui5-tooling

in vscode error happens when execute ui5 serve

liufeg0739 opened this issue · 2 comments

vscod has been set up.node -v is ok,npm -v is ok.
i created folder demo04, then execute npm init --yes,it's ok to generate package.json,
i created folder webapp, then execute ui5 init , its ok,
i created file:manifest.json, index.html ,then execute ui5 serve,error happens:

Error Message:
Failed to read /manifest.json for project demo04: Unexpected end of JSON input

For details, execute the same command again with an additional '--verbose' parameter
PS D:\DEMO04> ui5 serve --verbose
verb cli:middlewares:base using @ui5/cli version 3.10.3 (from C:\Users\86156\AppData\Roaming\npm\node_modules@ui5\cli\bin\ui5.cjs)
verb cli:middlewares:base using node version v20.14.0
verb generateProjectGraph Creating project graph using npm provider...
verb generateProjectGraph No workspace configuration file provided at D:\DEMO04\ui5-workspace.yaml
verb graph:Module Could not find any build manifest in module demo04
verb graph:Module Configuration for module demo04 is provided in YAML file at ui5.yaml
verb specifications:types:Application Path mapping for application project demo04:
verb specifications:types:Application Physical root path: D:\DEMO04
verb specifications:types:Application Mapped to: webapp

⚠️ Process Failed With Error

Error Message:
Failed to read /manifest.json for project demo04: Unexpected end of JSON input

Stack Trace:
Error: Failed to read /manifest.json for project demo04: Unexpected end of JSON input
at file:///C:/Users/86156/AppData/Roaming/npm/node_modules/@ui5/cli/node_modules/@ui5/project/lib/specifications/types/Application.js:237:11
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Application._getNamespaceFromManifestJson (file:///C:/Users/86156/AppData/Roaming/npm/node_modules/@ui5/cli/node_modules/@ui5/project/lib/specifications/types/Application.js:167:20)
at async Application._getNamespace (file:///C:/Users/86156/AppData/Roaming/npm/node_modules/@ui5/cli/node_modules/@ui5/project/lib/specifications/types/Application.js:131:11)
at async Application._parseConfiguration (file:///C:/Users/86156/AppData/Roaming/npm/node_modules/@ui5/cli/node_modules/@ui5/project/lib/specifications/types/Application.js:119:21)
at async Application.init (file:///C:/Users/86156/AppData/Roaming/npm/node_modules/@ui5/cli/node_modules/@ui5/project/lib/specifications/Project.js:38:3)
at async file:///C:/Users/86156/AppData/Roaming/npm/node_modules/@ui5/cli/node_modules/@ui5/project/lib/graph/Module.js:165:17
at async Promise.all (index 0)
at async Module._getSpecifications (file:///C:/Users/86156/AppData/Roaming/npm/node_modules/@ui5/cli/node_modules/@ui5/project/lib/graph/Module.js:160:17)
at async projectGraphBuilder (file:///C:/Users/86156/AppData/Roaming/npm/node_modules/@ui5/cli/node_modules/@ui5/project/lib/graph/projectGraphBuilder.js:118:61)

If you think this is an issue of the UI5 Tooling, you might report it using the following URL: https://github.com/SAP/ui5-tooling/issues/new/choose

i think manifest.json is ok,its copy and paste like usual,whats the problem,anbody can help me ,thanks a lot.

Hi @liufeg0739 ,

Please check the error message. Your manifest.json seems to be an empty file and respectively it is not a valid JSON.
You'd need to fill it out. You can take for example the openui5-sample-app's manifest: https://github.com/SAP/openui5-sample-app/blob/main/webapp/manifest.json

Cheers