gpt4 book ai didi

node.js npm install ws 错误 "npm ERR! network"安装 Web 套接字

转载 作者:行者123 更新时间:2023-12-04 18:34:22 27 4
gpt4 key购买 nike

从运行 Ubuntu 14.04 的 digital ocean 服务器安装 Node 套接字时遇到困难,我的目标是通过本教程 http://phoboslab.org/log/2013/09/html5-live-video-streaming-via-websockets 之后的网络套接字从树莓派流式传输到我的网络服务器

我在这里遵循了以下类似的问题,并通过了解决方案,但仍然无济于事"message failed to fetch from registry" while trying to install any module

更新我的 nodejs 和 npm 版本后,我现在遇到了错误

npm ERR! network getaddrinfo ENOTFOUND
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'

npm ERR! System Linux 3.13.0-36-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "ws"
npm ERR! cwd /root
npm ERR! node -v v0.10.38
npm ERR! npm -v 1.4.28
npm ERR! syscall getaddrinfo
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /root/npm-debug.log
npm ERR! not ok code 0

最佳答案

我遇到了类似的问题,正在运行 npm upgrade解决它。问题是 package-lock.json文件有一个旧端点,其中一个依赖项不再存在。升级命令将其更改为注册表中列出的当前端点。

关于node.js npm install ws 错误 "npm ERR! network"安装 Web 套接字,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30081825/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com