安装 npm 包失败,出现 404 错误。

huangapple go评论69阅读模式
英文:

Installing package npm fails with 404

问题

使用命令提示符,我正在尝试安装mineflayer-autoclicker,但失败了。我正在使用Node.js 18.17.0 LTS的Visual Studio Code版本,尝试使用终端安装mineflayer-autoclicker。

npm install --save mineflayer-autoclicker
npm ERR! code E404
npm ERR! 404 Not Found - GET https://github.com/npm/npm-registry-couchapp/mineflayer-autoclicker - Not Found
npm ERR! 404
npm ERR! 404  'mineflayer-autoclicker@*' is not in this registry.
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
英文:

Using the command prompt, I am trying to install mineflayer-autoclicker and it fails.I am writing in Visual Studio Code version of Node.js 18.17.0 LTS. I am trying to install mineflayer-autoclicker using the terminal.

npm install --save mineflayer-autoclicker
npm ERR! code E404
npm ERR! 404 Not Found - GET https://github.com/npm/npm-registry-couchapp/mineflayer-autoclicker - Not Found
npm ERR! 404
npm ERR! 404  'mineflayer-autoclicker@*' is not in this registry.
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

答案1

得分: 1

运行以下命令来解决这个问题:

npm config set registry http://registry.npmjs.org
npm -g install npm
npm cache clean -f

然后再次运行安装命令。

英文:

Run the commands below to solve this issue

npm config set registry http://registry.npmjs.org
npm -g install npm
npm cache clean -f

Then run the installation command again.

huangapple
  • 本文由 发表于 2023年7月28日 03:08:11
  • 转载请务必保留本文链接:https://go.coder-hub.com/76782748.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定