尝试在我的Raspberry Pi上安装带有NPM的Sodium时,安装总是失败并抱怨它没有/home/Captain/node_modules/libsodium
的写入权限。我正在通过sudo
运行安装命令,安装仍然不想工作。我刚刚搞砸了我的安装吗?
$ sudo npm install sodium
npm WARN checkPermissions Missing write access to /home/Captain/node_modules/libsodium
npm WARN enoent ENOENT: no such file or directory, open '/home/Captain/package.json'
npm WARN discord.js@11.2.1 requires a peer of erlpack@hammerandchisel/erlpack but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.2.1 requires a peer of node-opus@^0.2.6 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.2.1 requires a peer of opusscript@^0.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.2.1 requires a peer of libsodium-wrappers@^0.5.4 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.2.1 requires a peer of uws@^0.14.5 but none is installed. You must install peer dependencies yourself.
npm WARN Captain No description
npm WARN Captain No repository field.
npm WARN Captain No README data
npm WARN Captain No license field.
npm ERR! path /home/Captain/node_modules/libsodium
npm ERR! code ELOOP
npm ERR! errno -40
npm ERR! syscall access
npm ERR! ELOOP: too many symbolic links encountered, access '/home/Captain/node_modules/libsodium'
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2017-11-21T02_23_41_242Z-debug.log
答案 0 :(得分:0)
尝试此命令
sudo chmod 777 /home/Captain/node_modules/libsodium
应该修复它。