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

时间:2019-12-01 19:20:02

标签: 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 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

将寻求任何帮助。谢谢大家!

1 个答案:

答案 0 :(得分:0)

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