admin管理员组文章数量:1290945
I'm new to Node.js and installed nodejs
using asdf-vm
on my WSL2 ArchLinux
environment. When attempting to install the react-icons
or any package using npm, I encountered the following error:
❯ npm install react-icons
npm error code E404
[...]
The command npm install react-icons
resulted in a 404 Not Found error, indicating that the package could not be found in the npm registry. However, after changing the npm registry to use HTTP instead of HTTPS with the command npm config set registry /
, the installation was successful.
Step-by-step exemple:
- Prerequisites: Assuming asdf
is already installed.
asdf plugin-add nodejs .git
asdf list all nodejs
asdf install nodejs latest
asdf local nodejs <versao>
npx create-next-app@latest
cd my-nextjs-app
npm install react-icons
Encountering
npm error code E404
npm config set registry /
Encountering
npm error code E404
npm config set registry /
npm install react-icons
Success!
react-icons
should now install
I'm trying to understand why the installation failed when using HTTPS and succeeded after switching to HTTP. Is this behavior expected, and are there any security implications associated with using HTTP instead of HTTPS for npm registry access?
版权声明:本文标题:node.js - npm install results in E404 error with HTTPS - resolved by switching to HTTP registry - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741522041a2383245.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论