Problem about Running Node with Wine

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
hcfw007
Newbie
Newbie
Posts: 4
Joined: Tue Oct 12, 2021 2:39 am

Problem about Running Node with Wine

Post by hcfw007 »

I know it's kinda weird to run Node via wine, but we need node to control another software which is only distributed on Windows.
We used to go with Node 10 and Wine 5, and it works fine. However we need to upgrade to Node 16. It requires ws2_32.dll.GetHostNameW function which is not implemented on on Wine 5.
So I go with Wine 6.18, and strange thing happened. I installed node with nodevars.bat, and node -v works fine if the js file is in drive C. But all npm calls and node on drive Z comes up with the following error:

Code: Select all

Error: EINVAL: invalid argument, lstat 'Z:\'
    at Object.realpathSync (node:fs:2444:5)
    at toRealPath (node:internal/modules/cjs/loader:394:13)
    at Function.Module._findPath (node:internal/modules/cjs/loader:550:22)
    at resolveMainPath (node:internal/modules/run_main:15:25)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:73:24)
    at node:internal/main/run_main_module:17:47 {
  errno: -4071,
  syscall: 'lstat',
  code: 'EINVAL',
  path: 'Z:\\'
}
If you have any idea about it please help. Thanks.
kjSR3yyK
Level 1
Level 1
Posts: 5
Joined: Fri Oct 15, 2021 3:59 am

Re: Problem about Running Node with Wine

Post by kjSR3yyK »

Please report it as a bug on Bugzilla: https://bugs.winehq.org/
Locked