【问题标题】:Discord JS npm install discord.js ProblemDiscord JS npm install discord.js 问题
【发布时间】:2021-03-24 14:25:52
【问题描述】:
C:\Users\PC\Documents\bot> npm install discord.js
npm WARN tar EPERM: operation not permitted, open 'C:\Users\PC\Documents\bot\node_modules\.staging\setimmediate-ba27c7e7\LICENSE.txt'
npm WARN tar EPERM: operation not permitted, open 'C:\Users\PC\Documents\bot\node_modules\.staging\discord.js-4ced0e0d\webpack\discord.js.LICENSE.txt'
npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:
npm ERR!     <https://npm.community>

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\PC\AppData\Roaming\npm-cache\_logs\2020-12-13T21_02_55_389Z-debug.log

【问题讨论】:

  • 看起来您需要获得安装 npm 的权限...在 unix 系统上,这需要在您的 npm install 前面加上 sudo... 不确定 Windows

标签: windows npm discord.js


【解决方案1】:

如果你有 npm 5 或更高版本,请先试试这个:

$ npm cache verify

否则:

$ npm cache clean

这个错误应该和你的缓存有关,如果不是,请尝试重新安装 npm 和 node。

【讨论】:

    猜你喜欢
    • 2018-06-16
    • 2021-10-16
    • 1970-01-01
    • 1970-01-01
    • 2014-10-17
    • 1970-01-01
    • 1970-01-01
    • 2020-09-17
    • 2017-09-10
    相关资源
    最近更新 更多