【问题标题】:why does node-sodium package is not working为什么 node-sodium 包不起作用
【发布时间】:2021-06-05 11:58:45
【问题描述】:

这里我使用 node 来制作一个不和谐的机器人,但我认为包中有问题 此外,在 node_modules 目录(文件夹)中找不到钠 尝试了很多方法,但没有任何效果:(

Repl.it: Updating package configuration

--> npm install

> sodium@3.0.2 preinstall /home/runner/test/node_modules/sodium
> node install.js --preinstall

Static libsodium was not found at /home/runner/test/node_modules/sodium/deps/build/lib/libsodium so compiling libsodium from source.
libtool is required, but wasn't found on this system
Makefile:61: recipe for target 'libsodium' failed
make: *** [libsodium] Error 1
/home/runner/bgrb/node_modules/sodium/install.js:293
            throw new Error(cmdLine + ' exited with code ' + code);
            ^

Error: make libsodium exited with code 2
    at ChildProcess.<anonymous> (/home/runner/test/node_modules/sodium/install.js:293:19)
    at ChildProcess.emit (events.js:314:20)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
npm WARN discord.js@11.6.4 requires a peer of @discordjs/uws@^10.149.0 but none is installed. You must install peer dependencies yourself.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sodium@3.0.2 preinstall: `node install.js --preinstall`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the sodium@3.0.2 preinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/runner/.npm/_logs/2021-03-07T10_42_18_435Z-debug.log
exit status 1

【问题讨论】:

    标签: node.js npm discord.js libsodium sodium


    【解决方案1】:

    我假设您使用的是某种形式的 linux 发行版。 (如果我错了,请纠正我。)


    看起来你错过了libtool

    尝试在终端中运行apt-get install libtool。 (或使用您正在使用的任何包管理器安装!)


    如果您没有使用 linux,或者您仍然遇到问题,请随时回复此帖子。

    【讨论】:

      猜你喜欢
      • 2015-08-19
      • 2013-08-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-12-22
      • 2010-10-23
      相关资源
      最近更新 更多