无法在我的节点服务器中安装iohook(安装过程中出错)

问题描述 投票:0回答:1

我正在尝试添加检测 PC 上任何位置按键的功能,并且我看到了 ihook。

所以我用

yarn add iohook
安装它,尽管该过程总是失败,因为下载链接似乎丢失(404 错误)

这是我在安装模块时第一次遇到这种情况,所以我不知道我应该做什么...非常感谢您的帮助。

以下是日志:

yarn add v1.22.22
warning ..\package.json: No license field
info No lockfile found.
[1/4] Resolving packages...
warning iohook > nugget > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
warning iohook > nugget > request > [email protected]: this library is no longer supported
warning iohook > nugget > request > [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
error D:\Documents\WebStorm projects\Twitch bot\TwitchNode\node_modules\iohook: Command failed.
Exit code: 1
Command: node install.js
Arguments:
Directory: D:\Documents\WebStorm projects\Twitch bot\TwitchNode\node_modules\iohook
Output:
Downloading prebuild for platform: iohook-v0.9.3-node-v115-win32-x64
Downloading prebuild.tar.gz
Error: GET https://github.com/wilix-team/iohook/releases/download/v0.9.3/iohook-v0.9.3-node-v115-win32-x64.tar.gz returned 404
Prebuild for current platform (iohook-v0.9.3-node-v115-win32-x64) not found!
Try to build for your platform manually:
# cd node_modules/iohook;
# npm run build

D:\Documents\WebStorm projects\Twitch bot\TwitchNode\node_modules\iohook\install.js:16
  throw err;
  ^

[Error: ENOENT: no such file or directory, open 'C:\Users\DRAKEM~1\AppData\Local\Temp\prebuild.tar.gz'] {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'open',
  path: 'C:\\Users\\DRAKEM~1\\AppData\\Local\\Temp\\prebuild.tar.gz'
}

Node.js v20.12.2
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
javascript node.js http-status-code-404 hadoop-yarn
1个回答
0
投票

尝试这个 npm install ihook --save

© www.soinside.com 2019 - 2024. All rights reserved.