npm 不支持 Node.js v10.19.0 您可能应该升级到较新版本的 Node,因为我们无法保证 npm 将与此版本配合使用。您可以在https://nodejs.org/找到最新版本
我正在尝试将我的节点版本更新到最新的稳定版。
使用此资源,我能够:
sudo npm install n -g
Run Code Online (Sandbox Code Playgroud)
但是当我尝试
sudo npm n stable
Run Code Online (Sandbox Code Playgroud)
我得到:
sudo: n: command not found
Run Code Online (Sandbox Code Playgroud)
如果我运行n stable,则存在命令:
n stable
mkdir: cannot create directory ‘/usr/local/n’: Permission denied
mkdir: cannot create directory ‘/usr/local/n’: Permission denied
mkdir: cannot create directory ‘/usr/local/n’: Permission denied
mkdir: cannot create directory ‘/usr/local/n’: Permission denied
install : node-v0.12.2
mkdir : /usr/local/n/versions/node/0.12.2
mkdir: cannot create directory ‘/usr/local/n’: Permission denied
Error: sudo required
Run Code Online (Sandbox Code Playgroud) 跑sudo apt-get update在我的AWS EC2 Ubuntu的LTS 01年4月18日实例失败,因为我的证书验证失败:证书不被信任。尝试访问deb.nodesource.com/node_10.x 仿生版本时,证书颁发者未知
这是运行后的结果 sudo apt-get update
Hit:1 http://us-east-1.ec2.archive.ubuntu.com/ubuntu bionic InRelease
Get:2 http://us-east-1.ec2.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Ign:3 https://deb.nodesource.com/node_10.x bionic InRelease
Get:4 http://us-east-1.ec2.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Err:5 https://deb.nodesource.com/node_10.x bionic Release
Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: XX.XXX.XX.XX 443]
Get:6 http://security.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB]
Reading package lists... Done
W: https://deb.nodesource.com/node_10.x/dists/bionic/InRelease: No system …Run Code Online (Sandbox Code Playgroud) 我是用 ubuntu16.04 升级到 ubuntu18.04。按照一些教程删除 npm,但现在卡住了。我有:
~$ npm list -g
bash: /usr/bin/npm: No such file or directory
Run Code Online (Sandbox Code Playgroud)
和:
sudo apt-get install npm
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation: …Run Code Online (Sandbox Code Playgroud) 我的环境有点不同。我从 14.04 更新到 16.04 到 18.04。
我的台式机 18.04 安装了 npm。
$ npm -version
3.5.2
# nodejs -v
v8.10.0
# apt install npm
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the …Run Code Online (Sandbox Code Playgroud) 我正在尝试安装一个.deb包,但是它需要几个依赖项,例如 nodejs、nodejs-underscore,但所有这些都已经通过安装nvm并且可用。
无论如何我可以apt-get识别通过 nvm 安装的软件包,以便它们不会发生冲突?我知道 apt-get 是系统范围的,而 nvm 在本地用户空间工作,所以这可能需要一些黑客攻击。
我对 Ubuntu 14.04 知之甚少。
我需要安装 Node.js。我使用的 Ubuntu 是一个组织的大系统,所以我没有sudo访问权限,但我发现安装了 npm 1.3.10。
我正在寻找一系列命令来将 Node.js 安装到我的用户目录中。我Node.js从这里在 nodejs.org(LTS 版本,64 位)上下载了~/Downloads/node-v8.9.1-linux-x64.tar.xz. 我接下来该怎么做?
今天我决定npm update -g在 nodejs 应用程序目录中使用时遇到了一个问题。这是一个错误的决定,因为它让我遇到了 npm一个常见的灾难性问题。
解决办法是重新安装nodejs和npm。不幸的是,当我使用sudo apt-get install npm它安装 npm 时,它不起作用。
终端中的完整错误在这里:
Some packages could not be installed. This may mean that you have requested
an impossible situation or if you are using the unstable distribution that
some required packages have not yet been created or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
npm : Depends: nodejs but …Run Code Online (Sandbox Code Playgroud) 我已经从 nodesource.com 安装了 nodejs:
curl -sL https://deb.nodesource.com/setup_0.12 | sudo bash -
sudo apt-get install nodejs
Run Code Online (Sandbox Code Playgroud)
它已安装nodejs 0.12.4,但我现在如何删除它,包括该存储库中的所有足迹?
我可以在下面看到一个文件 /etc/apt/sources.list.d/nodesource.list
我已阅读此解决方案 。
我想要 nodeman 作为 react-native 的依赖
./configure命令没有错误, 并且按照给定的解决方案工作正常
gd@gd10:/tmp$ git clone https://github.com/facebook/watchman.git
Cloning into 'watchman'...
remote: Counting objects: 18852, done.
remote: Compressing objects: 100% (103/103), done.
remote: Total 18852 (delta 50), reused 64 (delta 27), pack-reused 18718
Receiving objects: 100% (18852/18852), 12.37 MiB | 1011.00 KiB/s, done.
Resolving deltas: 100% (12582/12582), done.
gd@gd10:/tmp$ cd watchman/
gd@gd10:/tmp/watchman$ git checkout v4.7.0
Note: checking out 'v4.7.0'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and …Run Code Online (Sandbox Code Playgroud)