ui5-community / wdi5

official UI5 end-to-end test framework for UI5 web-apps. wdi5 = Webdriver.IO + UI5 Test API
https://ui5-community.github.io/wdi5/
Apache License 2.0
102 stars 43 forks source link

Cannot install wdi5@latest due to fibers package (EINVAL) #623

Closed jvanattedev closed 3 months ago

jvanattedev commented 4 months ago

Describe the bug I cannot perform npm i wdi5@latest

Expected behavior A regular installation process

Logs/Console Output if applicable, please copypasta code-fenced log output, e.g.

PS path\zproject> npm install wdi5@latest
...
npm error code 1
npm error path path\zproject\node_modules\fibers
npm error command failed
npm error command C:\Windows\system32\cmd.exe /d /s /c node build.js || nodejs build.js
npm error node:internal/child_process:421
npm error     throw new ErrnoException(err, 'spawn');
npm error     ^
npm error
npm error Error: spawn EINVAL
npm error     at ChildProcess.spawn (node:internal/child_process:421:11)
npm error     at Object.spawn (node:child_process:761:9)
npm error     at build (C:\projects\zproject\node_modules\fibers\build.js:62:5)
npm error     at Object.<anonymous> (C:\projects\zproject\node_modules\fibers\build.js:51:3)
npm error     at Module._compile (node:internal/modules/cjs/loader:1358:14)
npm error     at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
npm error     at Module.load (node:internal/modules/cjs/loader:1208:32)
npm error     at Module._load (node:internal/modules/cjs/loader:1024:12)
npm error     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12)
npm error     at node:internal/main/run_main_module:28:49 {
npm error   errno: -4071,
npm error   code: 'EINVAL',
npm error   syscall: 'spawn'
npm error }
npm error
npm error Node.js v20.15.0
npm error 'nodejs' is not recognized as an internal or external command,
npm error operable program or batch file.

Runtime Env (please complete the following information):

**Other

The author of this package recommends not to use it: https://github.com/laverdet/node-fibers

github-actions[bot] commented 3 months ago

hey 👋 - silence for 30 days 🤐 ... anybody? 😀

vobu commented 3 months ago

fibers is no longer required for any wdio/wdi5 installation - odd that it still seems to be pulled in your case. I have seen somewhat similar behaviour in the past when non-LTS versions of node were used. Could you try upgrading your Node 20 install to 20.15.1?

jvanattedev commented 3 months ago

NodeJS has been updated to 20.15.1 and I still have the issue. It tries to get 'fibers'. It is a managed laptop; could it be a issue related to that? I could try the same at my home PC this evening. Or might is be a NodeJS caching issue (i'm not an expert).

vobu commented 3 months ago

sounds suspiciously like a caching/proxy issue. any previous versions for wdi5 installed the folder you're working in (check package.json for wdio-ui5-service) and/or any package-lock.json you could try deleting?

jvanattedev commented 3 months ago

I could not find anything like that. package-lock.json and node_modules was deleted. I also ran npm cache clean --force.

Afterwards I completely reinstalled nodejs: https://stackoverflow.com/questions/20711240/how-to-completely-remove-node-js-from-windows

And I still get the error with the fibers package.

Siolto commented 3 months ago

You are trying to install the wrong and outdated hybrid package: https://www.npmjs.com/package/wdi5

You want to install wdio-ui5-service.

Use following command:

npm init wdi5@latest
jvanattedev commented 3 months ago

You are trying to install the wrong and outdated hybrid package: https://www.npmjs.com/package/wdi5

You want to install wdio-ui5-service.

Use following command:

npm init wdi5@latest

This was the solution (npm init wdi5@latest instead of npm i wdi5@latest). Thx!