SAP/ui5-tooling

Getting Error: 'ENOTDIR: not a directory, scandir' using UI Tooling version 3.0

sammok83 opened this issue · 12 comments

Hi there,

When using ui5 serve -o or fiori run --open to run my app, I'm hit with the following error:

Error: ENOTDIR: not a directory, scandir 'C:\Users\Sam\Desktop\Development...\initFlpSandbox.js'

Expected Behavior

App is able to run successfully without any errors.
FYI, using @ui5/cli": "^2.14.6, it works.

Current Behavior

App is unable to run successfully with the error:
Error: ENOTDIR: not a directory, scandir 'C:\Users\Sam\Desktop\Development...\initFlpSandbox.js'
This is with "@ui5/cli": "^3.0.0"

Steps to Reproduce the Issue

Run ui5 serve -o test/flpSandbox.html#TestApp-manage on a generated template with any yeoman ui5-generator

Context

  • UI5 Module Version (output of ui5 --version when using the CLI): 3.0.0
  • Node.js Version: v18.12.1
  • npm Version: 9.4.2
  • OS/Platform: Windows 10
  • Browser (if relevant): Chrome
  • Other information regarding your environment (optional): nothing

Log Output / Stack Trace

I've checked the file initFlpSandbox.js file and it's there in the path specified

When running ui5 serve with verbose on:
e2
out there.

In Chrome, I'm getting this error
e1

we also have the same issue
image
in our case we are unable to load ui5 resources

Thanks for reporting. Could you please also share the content of the relevant ui5.yaml file?

We suspect this might be related to #779, which will be fixed in the next patch release.

@RandomByte here is our ui5.yaml
image

@AramSol Thanks for providing your config. Its indeed a duplicate of #779. Will be fixed in the next patch release.

Reopened to wait for an answer of @sammok83 (the original author)

@AramSol @sammok83 could you please verify if this issue is gone with release v3.0.1 of @ui5/cli

@flovogt, the ui5 serve now work as expected for me, but now ui5 build ignore the exclude resources, all exclude files get also minified and the custom task ui5-task-zipper also zip all the files that are listed in excludes section as well.
image

Thanks @flovogt. The latest release resolves the issue.

@flovogt, the ui5 serve now work as expected for me, but now ui5 build ignore the exclude resources, all exclude files get also minified and the custom task ui5-task-zipper also zip all the files that are listed in excludes section as well. !

Thank you for the quick feedback @AramSol! Indeed, while fixing this issue, we introduced a regression causing the builder excludes to be essentially ignored. This was an unfortunate oversight and we have to investigate how this slipped through our integration test.

I prepared another fix with SAP/ui5-project#582, which we will release ASAP.

CC: @flovogt

@AramSol should be resolved with v3.0.2

@flovogt, @RandomByte, for me the both build and serve work as expected. many thank for the fast response and fixes.