相关疑难解决方法(0)

如何完全卸载Node.js,并从头开始重新安装(Mac OS X)

在我安装brew节点和NVM安装v0.6.19之后,我的节点版本总是v0.6.1-pre.

我的节点版本是:

node -v
v0.6.1-pre
Run Code Online (Sandbox Code Playgroud)

NVM说这个(在我第一次在一个bash终端中安装一个版本的节点之后):

nvm ls
v0.6.19
current:    v0.6.19
Run Code Online (Sandbox Code Playgroud)

但是当我重新启动bash时,这就是我所看到的:

nvm ls
v0.6.19
current:    v0.6.1-pre
default -> 0.6.19 (-> v0.6.19)
Run Code Online (Sandbox Code Playgroud)

那么这个幻像节点0.6.1-pre版本在哪里?我该如何摆脱它?我正在尝试通过NPM安装库,以便我可以处理项目.

我尝试使用BREW在NVM之前更新,使用"brew update"和"brew install node".我已经尝试删除/ usr/local/include中的"node"目录以及"/ usr/local/lib"中的"node"和"node_modules".我已经尝试卸载npm并按照这些说明重新安装它.

所有这一切都是因为我试图更新旧版本的节点以安装"zipstream"库.现在我的用户目录中有文件夹,并且节点版本STILL不是最新的,即使NVM说它使用的是0.6.19.

理想情况下,我想卸载nodejs,npm和nvm,然后在我的系统上从头开始重新安装整个东西.

javascript node.js npm

1196
推荐指数
22
解决办法
146万
查看次数

npm在package.json中依赖安装私有github存储库

我正在尝试通过npm安装github私有存储库,其中包含其他私有github存储库作为依赖项.

尝试了很多方法和帖子,但没有一个工作.这是我正在做的事情:

npm install git+https://github.com/myusername/mygitrepository.git
Run Code Online (Sandbox Code Playgroud)

在package.json中就像:

"dependencies": {
    "repository1name": "git+https://github.com/myusername/repository1.git",
    "repository2name": "git+https://github.com/myusername/repository2.git"
}
Run Code Online (Sandbox Code Playgroud)

这样做的正确方法是什么?

dependencies github node.js npm package.json

192
推荐指数
8
解决办法
16万
查看次数

无法安装 NPM 包 - 代码 128 发生未知 git 错误

我正在尝试安装该软件包@truffle/hdwallet-provider

正如文档中所写,我正在运行:

npm i @truffle/hdwallet-provider
Run Code Online (Sandbox Code Playgroud)

这是我收到的错误消息:

npm ERR! code 128
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects ls-remote ssh://git@github.com/ethereumjs/ethereumjs-abi.git
npm ERR! git@github.com: Permission denied (publickey).
npm ERR! fatal: Could not read from remote repository.
npm ERR! 
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2022-03-08T14_13_15_122Z-debug-0.log
Run Code Online (Sandbox Code Playgroud)

这是日志:

698 verbose Linux 5.13.0-30-generic …
Run Code Online (Sandbox Code Playgroud)

package node.js npm npm-install truffle

6
推荐指数
1
解决办法
3万
查看次数