The "path" argument must be of type string. Received undefined after update to version "@sap-ux/ui5-middleware-fe-mockserver": "2"
Pascal-SV opened this issue · 1 comments
Pascal-SV commented
Hi there,
I updated SAPTooling to the last version and since then I am encountering that error when starting my unit tests:
npm run unit-tests
while this is defined as
"unit-tests": "fiori run --config ./ui5-mock.yaml --open 'test/unit/unitTests.qunit.html'"
in the package.json file.
Expected Behavior
No dump but my unit tests are processed in a browser window
Current Behavior
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
Steps to Reproduce the Issue
Run unit tests with given version
Context
- UI5 Module Version (output of
ui5 --version
when using the CLI): 1.108.2 - Node.js Version: 16.18.0
- npm Version: 8.3.0
- OS/Platform: MacOS (latest)
- Browser (if relevant): Brave
- Other information regarding your environment (optional):
nothing
Log Output / Stack Trace
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
at new NodeError (node:internal/errors:387:5)
at validateString (node:internal/validators:162:11)
at Object.resolve (node:path:1098:7)
at FEMiddleware (<path>/node_modules/@sap-ux/ui5-middleware-fe-mockserver/dist/index.js:34:16)
at customMiddleware (file://<path>/node_modules/@ui5/cli/node_modules/@ui5/server/lib/middleware/MiddlewareManager.js:313:53)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async MiddlewareManager.addMiddleware (file://<path>/node_modules/@ui5/cli/node_modules/@ui5/server/lib/middleware/MiddlewareManager.js:121:16)
at async MiddlewareManager.addCustomMiddleware (file://<path>/node_modules/@ui5/cli/node_modules/@ui5/server/lib/middleware/MiddlewareManager.js:295:4)
at async MiddlewareManager.applyMiddleware (file://<path>/node_modules/@ui5/cli/node_modules/@ui5/server/lib/middleware/MiddlewareManager.js:52:3)
at async serve (file://<path>/node_modules/@ui5/cli/node_modules/@ui5/server/lib/server.js:178:2)
at async Object.serve.handler (file://<path>/node_modules/@ui5/cli/lib/cli/commands/serve.js:136:33)
codeworrior commented
This is a known problem of the @sap-ux/ui5-middleware-fe-mockserver
, see SAP/open-ux-odata#409.
According to them it's fixed in their version 2.1.60.