NetrisTV / ws-scrcpy

Web client prototype for scrcpy.
MIT License
1.62k stars 316 forks source link

Npm install failed: throw new ErrnoException #319

Open PIKACHUIM opened 1 month ago

PIKACHUIM commented 1 month ago

System: Windows 10 LTSC 2021 Nodejs: Node.js v20.16.0 Details: When I clone and npm install it shows:

npm warn deprecated @types/puppeteer@7.0.4: This is a stub types definition. puppeteer provides its own type definitions, so you do not need this installed.
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated npmlog@5.0.1: This package is no longer supported.
npm warn deprecated npmlog@6.0.2: This package is no longer supported.
npm warn deprecated @humanwhocodes/config-array@0.11.14: Use @eslint/config-array instead
npm warn deprecated rimraf@2.4.5: Rimraf versions prior to v4 are no longer supported
npm warn deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported
npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated glob@6.0.4: Glob versions prior to v9 are no longer supported
npm warn deprecated are-we-there-yet@3.0.1: This package is no longer supported.
npm warn deprecated @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead
npm warn deprecated are-we-there-yet@2.0.0: This package is no longer supported.
npm warn deprecated xterm-addon-attach@0.6.0: This package is now deprecated. Move to @xterm/addon-attach instead.
npm warn deprecated xterm-addon-fit@0.5.0: This package is now deprecated. Move to @xterm/addon-fit instead.
npm warn deprecated gauge@4.0.4: This package is no longer supported.
npm warn deprecated gauge@3.0.2: This package is no longer supported.
npm warn deprecated @dabh/colors@1.4.0: @dabh/colors has been renamed to @colors/colors. Please update your package.json.
npm warn deprecated xterm@4.19.0: This package is now deprecated. Move to @xterm/xterm instead.
npm error code 1
npm error path D:\Code\ws-scrcpy\node_modules\node-pty
npm error command failed
npm error command C:\Windows\system32\cmd.exe /d /s /c node scripts/install.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 spawn (node:child_process:761:9)
npm error     at Object.<anonymous> (D:\Code\ws-scrcpy\node_modules\node-pty\scripts\install.js:11:20)
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.16.0
npm error A complete log of this run can be found in: C:\Users\***********\AppData\Local\npm-cache\_logs\2024-08-06T08_42_58_821Z-debug-0.log

Please help me, thanks! Full logs see: 2024-08-06T08_42_58_821Z-debug-0.log

zhaoshanhui commented 1 month ago

@PIKACHUIM Hello. Have you solved this problem? I've been struggling with this problem for days.

PIKACHUIM commented 1 month ago

@zhaoshanhui Not yet, I have tried others pc, while no one succeed. I use https://github.com/bk138/droidVNC-NG instead as a compromise solution.

guckasten commented 1 week ago

@zhaoshanhui You need to use a version no later than node17. I got an error code of -4071 when running with node18. I changed it to 16 and it worked.