当我尝试使用npm安装软件包时,它会给我一个权限拒绝错误

当我尝试使用npm安装软件包时,它会给我一个权限拒绝错误,npm,Npm,当我尝试使用npm安装任何软件包时,即使使用sudo,我也会收到一个权限拒绝错误 sudo npm install sqlite3 我得到以下错误: sh: 1: node-pre-gyp: Permission denied npm WARN discord.js@11.5.1 requires a peer of @discordjs/uws@^10.149.0 but none is installed. You must install peer dependencies yourse

当我尝试使用npm安装任何软件包时,即使使用sudo,我也会收到一个权限拒绝错误

sudo npm install sqlite3
我得到以下错误:

sh: 1: node-pre-gyp: Permission denied
npm WARN discord.js@11.5.1 requires a peer of @discordjs/uws@^10.149.0 but none is installed. You must install peer dependencies yourself.
npm WARN youbot@0.2.3 No description
npm WARN youbot@0.2.3 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! sqlite3@4.1.0 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 126
npm ERR! 
npm ERR! Failed at the sqlite3@4.1.0 install 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!     /root/.npm/_logs/2019-12-01T19_13_09_034Z-debug.log

任何帮助都将受到感谢。谢谢大家!

您需要先安装此软件包
@discordjs/uws@^10.149.0

再次出现相同错误。任何其他解决方案都值得推荐!