【问题标题】:I accidentally typo'd "npm i npm" and it installed a bunch of node modules I didn't need. How can I revert?我不小心打错了“npm i npm”,它安装了一堆我不需要的节点模块。我怎样才能恢复?
【发布时间】:2019-10-13 18:27:43
【问题描述】:

我是新手,我迷路了,因为我认为我把整个程序搞砸了。我无法再安装节点变体。我正在使用 Visual Studio 代码。在下面的代码之后,我输入了“npm uninstall npm”,以为它会修复它,但似乎没有。

我尝试了 npm uninstall npm,但没有成功。 :/

npm WARN discord.js@11.5.0 requires a peer of bufferutil@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.5.0 requires a peer of erlpack@discordapp/erlpack but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.5.0 requires a peer of libsodium-wrappers@^0.7.3 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.5.0 requires a peer of node-opus@^0.2.7 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.5.0 requires a peer of opusscript@^0.0.6 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.5.0 requires a peer of sodium@^2.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.5.0 requires a peer of @discordjs/uws@^10.149.0 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js-commando@0.10.0 requires a peer of sqlite@^2.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN westeros-bot@1.0.0 No description
npm WARN westeros-bot@1.0.0 No repository field.

+ npm@6.9.0
added 426 packages from 800 contributors and audited 12108 packages in 45.684s
found 12 high severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details```

AFTER

```c:\Users\madel\Desktop\Westeros Bot\dist>npm uninstall npm
npm WARN discord.js@11.5.0 requires a peer of bufferutil@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.5.0 requires a peer of erlpack@discordapp/erlpack but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.5.0 requires a peer of libsodium-wrappers@^0.7.3 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.5.0 requires a peer of node-opus@^0.2.7 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.5.0 requires a peer of opusscript@^0.0.6 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.5.0 requires a peer of sodium@^2.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.5.0 requires a peer of @discordjs/uws@^10.149.0 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js-commando@0.10.0 requires a peer of sqlite@^2.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN westeros-bot@1.0.0 No description
npm WARN westeros-bot@1.0.0 No repository field.

removed 426 packages and audited 12 packages in 7.294s
found 0 vulnerabilities```

【问题讨论】:

  • 那么它现在究竟是如何“不起作用”的呢?有什么问题?

标签: npm node-modules uninstallation


【解决方案1】:

您可以尝试npm remove npm 并运行npm install 来更新package-lock.json 文件。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-07-20
    • 2014-06-07
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多