sap-tutorials / Tutorials

Tutorials on sap.com
https://developers.sap.com/tutorial-navigator.html
Creative Commons Attribution 4.0 International
693 stars 766 forks source link

yo easy-ui5 project #23327

Open thavasisekar opened 7 months ago

thavasisekar commented 7 months ago

yo easy-ui5 project

 _-----_
|       |    ╭──────────────────────────╮
|--(o)--|    │  Welcome to the easy-ui5 │

---------´ │ 3.7.0 generator! │ ( _´U_ ) ╰──────────────────────────╯ /A\ / | ~ | __'._.' ´ |° ´ Y

? What do you want to do? app [app] ? How do you want to name this project? myui5app ? Which namespace do you want to use? com.myorg ? Do you want to enable the SAP Fiori elements flexible programming model? No ? On which platform would you like to host the application? Application Router @ Cloud Foundry ? Which view type do you want to use? XML ? Where should your UI5 libs be served from? Content delivery network (SAPUI5) ? Would you like to create a new directory for the project? Yes ? Would you like to initialize a local git repository for the project? No force com.myorg.myui5app.yo-rc.json create com.myorg.myui5app\package.json create com.myorg.myui5app.editorconfig create com.myorg.myui5app.eslintignore create com.myorg.myui5app.eslintrc create com.myorg.myui5app.gitignore create com.myorg.myui5app.prettierignore create com.myorg.myui5app.prettierrc create com.myorg.myui5app\karma-ci.conf.js create com.myorg.myui5app\karma.conf.js create com.myorg.myui5app\readme.md ⚠ ️ patched @sap-ux's MainViewController.js to use ./BaseController ⚠ ️ patched @sap-ux's flpSandbox.html to boostrap only SAPUI5 (sap.ushell!) used @sap-ux/fiori-freestyle-writer to generate freestyle app skeleton :) ⚠ ️ patched @sap-ux's index.html with Content delivery network (SAPUI5) configuring app router settings... force com.myorg.myui5app.yo-rc.json create com.myorg.myui5app\mta.yaml create com.myorg.myui5app\approuter\package.json create com.myorg.myui5app\approuter\xs-app.json create com.myorg.myui5app\deployer\readme.md create com.myorg.myui5app\uimodule\ui5.yaml create com.myorg.myui5app\uimodule\webapp\Component.js create com.myorg.myui5app\uimodule\webapp\index.html create com.myorg.myui5app\uimodule\webapp\manifest.json create com.myorg.myui5app\uimodule\webapp\i18n\i18n.properties create com.myorg.myui5app\uimodule\webapp\model\models.js create com.myorg.myui5app\uimodule\webapp\test\flpSandbox.html create com.myorg.myui5app\uimodule\webapp\controller\App.controller.js create com.myorg.myui5app\uimodule\webapp\css\style.css create com.myorg.myui5app\uimodule\webapp\view\App.view.xml create com.myorg.myui5app\uimodule\webapp\view\MainView.view.xml create com.myorg.myui5app\uimodule\webapp\controller\MainView.controller.js create com.myorg.myui5app\uimodule\webapp\controller\BaseController.js create com.myorg.myui5app\uimodule\webapp\model\formatter.js create com.myorg.myui5app\uimodule\webapp\test\integration\AllJourneys.js create com.myorg.myui5app\uimodule\webapp\test\integration\arrangements\Startup.js create com.myorg.myui5app\uimodule\webapp\test\integration\opaTests.qunit.html create com.myorg.myui5app\uimodule\webapp\test\integration\opaTests.qunit.js create com.myorg.myui5app\uimodule\webapp\test\testsuite.qunit.html create com.myorg.myui5app\uimodule\webapp\test\testsuite.qunit.js identical com.myorg.myui5app.yo-rc.json identical com.myorg.myui5app\uimodule\webapp\test\integration\pages\Main.js identical com.myorg.myui5app\uimodule\webapp\test\integration\MainJourney.js force com.myorg.myui5app.yo-rc.json npm WARN deprecated babel-preset-es2015@6.24.1: 🙌 Thanks for using Babel: we recommend using babel-preset-env now: please read https://babeljs.io/env to update! npm WARN deprecated ui5-middleware-cfdestination@3.3.11: The UI5 tooling extension ui5-middleware-cfdestination has been renamed to ui5-middleware-approuter starting with version 3.4.0 npm WARN deprecated scmp@1.0.0: scmp v2 uses improved core crypto comparison since Node v6.6.0 npm WARN deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.

added 1674 packages, and audited 1675 packages in 2m

198 packages are looking for funding run npm fund for details

4 high severity vulnerabilities

Some issues need review, and may require choosing a different dependency.

Run npm audit for details.

myui5app@0.0.1 lint-fix eslint .//webapp//.js --fix && prettier --plugin-search-dir=. --write .//webapp//.{js,xml} --no-error-on-unmatched-pattern

[warn] Ignored unknown option --plugin-search-dir=.. uimodule/webapp/Component.js 69ms uimodule/webapp/controller/App.controller.js 5ms uimodule/webapp/controller/BaseController.js 13ms uimodule/webapp/controller/MainView.controller.js 5ms uimodule/webapp/model/formatter.js 3ms (unchanged) uimodule/webapp/model/models.js 5ms uimodule/webapp/test/integration/AllJourneys.js 4ms uimodule/webapp/test/integration/arrangements/Startup.js 4ms uimodule/webapp/test/integration/MainJourney.js 5ms uimodule/webapp/test/integration/opaTests.qunit.js 5ms (unchanged) uimodule/webapp/test/integration/pages/Main.js 8ms uimodule/webapp/test/testsuite.qunit.js 5ms (unchanged) [error] No parser could be inferred for file "C:\Users\Thavasi\com.myorg.myui5app\uimodule\webapp\view\App.view.xml". [error] No parser could be inferred for file "C:\Users\Thavasi\com.myorg.myui5app\uimodule\webapp\view\MainView.view.xml". × An error occured while running ui5-project:app#end Error easy-ui5 project

Command failed with exit code 2: npm run lint-fix

thavasisekar commented 6 months ago

@jmmargo can you solve this problem?

jmmargo commented 6 months ago

What exactly is the problem?

thavasisekar commented 6 months ago

@jmmargo when i creating the scaffold sapui5 project, the project shown the error

Steps to reproduce the problem: Step 1 Install NodeJS version 18 Step 2 npm install -g yo generator-easy-ui5 Step 3 execute yo easy-ui5 project

Node version :v18.17.0

Screenshot 2023-12-28 134649 v

jmmargo commented 6 months ago

What is the name of the tutorial that was instructing you? I need to forward this to the tutorial author. Thank you.

thavasisekar commented 6 months ago

I am following the sap official tutorial https://developers.sap.com/tutorials/cp-cf-sapui5-local-setup.html#9e27bed0-053a-4162-a2ae-03cb3b729065

jmmargo commented 6 months ago

Nico, you are listed as the author of this tutorial. Are you able to help?

nicoschoenteich commented 6 months ago

Hi @jmmargo and @thavasisekar, thanks for reporting. This issue has already been reported in the project repo, too (https://github.com/SAP/generator-easy-ui5/issues/138). We are working on a fix. In the meantime, please try using https://github.com/ui5-community/generator-ui5-app. Best, Nico

ziyang-works commented 6 months ago

The generated project uses prettier --plugin-search-dir in its package.json's lint and lint-fix script with Prettier version set to latest, but --plugin-search-dir has been deprecated by Prettier since version 3.0. https://prettier.io/blog/2023/07/05/3.0.0.html#plugin-search-feature-has-been-removed-14759httpsgithubcomprettierprettierpull14759-by-fiskerhttpsgithubcomfisker

I used the following fix as a temporary workaround

  1. Adapt the following scripts in package.json:
    - "lint": "eslint ./**/webapp/**/*.js && prettier --plugin-search-dir=. --check ./**/webapp/**/*.{js,xml} --no-error-on-unmatched-pattern",
    + "lint": "eslint ./**/webapp/**/*.js && prettier --plugin=@prettier/plugin-xml --check ./**/webapp/**/*.{js,xml} --no-error-on-unmatched-pattern",
    - "lint-fix": "eslint ./**/webapp/**/*.js --fix && prettier --plugin-search-dir=. --write ./**/webapp/**/*.{js,xml} --no-error-on-unmatched-pattern",
    + "lint-fix": "eslint ./**/webapp/**/*.js --fix && prettier --plugin=@prettier/plugin-xml --write ./**/webapp/**/*.{js,xml} --no-error-on-unmatched-pattern",
  2. Run npm run lint-fix
thavasisekar commented 6 months ago

@nicoschoenteich @ziyang-works Thank you.