SAP / generator-easy-ui5

Meta-generator various project types within the UI5 Universe
https://blogs.sap.com/2021/04/09/easy-ui5-3.0-from-community-contributions-to-community-plugins/
Apache License 2.0
243 stars 72 forks source link

No such file or directory "ui5-local.yaml" #105

Closed kennethsumang closed 1 year ago

kennethsumang commented 2 years ago

Easy-Ui5 version:

Run yo easy-ui5 --plugins to print all relevant version strings


Node.js: v18.2.0
yeoman-environment: 3.9.1
generator-easy-ui5: 3.4.0
home: /opt/homebrew/lib/node_modules/generator-easy-ui5
pluginsHome: /opt/homebrew/lib/node_modules/generator-easy-ui5/plugin-generators

Available generators:

OS/version:

MacOS 12.4

Browser/version (+device/version):

MacBook Pro M1 13"

Steps to reproduce the problem:

  1. Run "yo easy-ui5 project"
  2. Select "Create a new OpenUI5/SAPUI5 project"
  3. Select default name and namespace for the app.
  4. Select "static webserver" for the platform.
  5. Select "XML" as view type.
  6. Select CDN for OpenUI5
  7. Select "Yes" for creating new directory for the app.
  8. Select "Yes" for adding Javascript code assist libraries.

What is the expected result?

The project will be created.

What happens instead?

used @sap-ux/fiori-freestyle-writer to generate freestyle app skeleton :)
  ⚠ ️ patched @sap-ux's index.html with Content delivery network (OpenUI5)
  ⚠ ️ patched @sap-ux's flpSandbox.html to boostrap only SAPUI5 (sap.ushell!)
  ⚠ ️ patched @sap-ux's MainViewController.js to use ./BaseController
node:events:505
      throw er; // Unhandled 'error' event
      ^

Error: ENOENT: no such file or directory, scandir '/Users/kennethsumang/Documents/www/sapui5/com.myorg.myUI5App/uimodule/ui5-local.yaml'
    at Object.readdirSync (node:fs:1420:3)
    at exports.readdir (/opt/homebrew/lib/node_modules/generator-easy-ui5/plugin-generators/generator-ui5-project/node_modules/@mrmlnc/readdir-enhanced/lib/sync/fs.js:18:20)
    at Object.safeCall [as safe] (/opt/homebrew/lib/node_modules/generator-easy-ui5/plugin-generators/generator-ui5-project/node_modules/@mrmlnc/readdir-enhanced/lib/call.js:24:8)
    at DirectoryReader.readNextDirectory (/opt/homebrew/lib/node_modules/generator-easy-ui5/plugin-generators/generator-ui5-project/node_modules/@mrmlnc/readdir-enhanced/lib/directory-reader.js:78:10)
    at DirectoryReader.stream._read (/opt/homebrew/lib/node_modules/generator-easy-ui5/plugin-generators/generator-ui5-project/node_modules/@mrmlnc/readdir-enhanced/lib/directory-reader.js:57:18)
    at Readable.read (node:internal/streams/readable:496:12)
    at readdirSync (/opt/homebrew/lib/node_modules/generator-easy-ui5/plugin-generators/generator-ui5-project/node_modules/@mrmlnc/readdir-enhanced/lib/sync/index.js:27:21)
    at Function.readdirSyncStat (/opt/homebrew/lib/node_modules/generator-easy-ui5/plugin-generators/generator-ui5-project/node_modules/@mrmlnc/readdir-enhanced/lib/index.js:34:10)
    at ReaderSync.dynamicApi (/opt/homebrew/lib/node_modules/generator-easy-ui5/plugin-generators/generator-ui5-project/node_modules/fast-glob/out/providers/reader-sync.js:64:24)
    at ReaderSync.api (/opt/homebrew/lib/node_modules/generator-easy-ui5/plugin-generators/generator-ui5-project/node_modules/fast-glob/out/providers/reader-sync.js:56:25)
Emitted 'error' event on Readable instance at:
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -2,
  syscall: 'scandir',
  code: 'ENOENT',
  path: '/Users/kennethsumang/Documents/www/sapui5/com.myorg.myUI5App/uimodule/ui5-local.yaml'
}

Node.js v18.2.0

Any other information? (attach screenshot if possible)

jamess0160 commented 2 years ago

I am having the same problem here but on Windows 11

jamess0160 commented 2 years ago

I spotted this error today, and i was doing some testing and found that if you create the project with json view it works normal

vishnukantraman commented 2 years ago

Same issue, windows 11. XML view has issue. JSON works fine.

nicoschoenteich commented 2 years ago

First observation: This is related to node 18. Node 16 works fine. Will do further investigation.

haslinger commented 2 years ago

@nicoschoenteich: I can confirm that downgrading to Node v16.16.0 fixes the issue for me.

uiyoungkim commented 1 year ago

i have same issue. DId you guys figure it out how to fix it?

boghyon commented 1 year ago

I can confirm that the issue is now resolved thanks to everyone involved in https://github.com/ui5-community/generator-ui5-project/commit/5704766a0590c77a76701a17b330e028fcf8bb7e 🚀
Run npm install -g yo generator-easy-ui5 to upgrade the Easy-UI5 generator.