关注PNPM的官方文档,安装失败

时间:2019-02-23 12:27:06

标签: npm npm-install pnpm

小背景故事 我试图使用pnpm,但是在安装时出了点问题,起初我以为是文件损坏或什么了,所以我尝试再次卸载并安装它,但是同一件事发生了3次。.所以这就是他们所说的来自文档本身。

直接来自docs

通过npm: 成功

npm install -g pnpm

但是,在下一步中,出了点问题。.我不知道为什么,因为使用NPM时我仍然是新手。

首次安装pnpm后,可以使用pnpm对其进行升级:

pnpm install -g pnpm

然后这条日志出来了

Nothing to stop. No server is running for the store at C:\Users\<UserName>\.pnpm-store\2
Resolving: total 1, reused 0, downloaded 0
Resolving: total 1, reused 0, downloaded 0
Resolving: total 1, reused 0, downloaded 0
Packages: +1
+
Resolving: total 1, reused 0, downloaded 0
Resolving: total 1, reused 0, downloaded 0
Resolving: total 1, reused 0, downloaded 0
Resolving: total 1, reused 0, downloaded 0
Resolving: total 1, reused 0, downloaded 0
Resolving: total 1, reused 0, downloaded 0
Resolving: total 1, reused 0, downloaded 0
Resolving: total 1, reused 0, downloaded 0
Resolving: total 1, reused 0, downloaded 0
Resolving: total 1, reused 0, downloaded 0
Resolving: total 1, reused 0, downloaded 0
Resolving: total 1, reused 0, downloaded 0
Resolving: total 1, reused 0, downloaded 0
Resolving: total 1, reused 0, downloaded 0
Resolving: total 1, reused 0, downloaded 0
Resolving: total 1, reused 0, downloaded 0
Resolving: total 1, reused 0, downloaded 0
Resolving: total 1, reused 0, downloaded 0
Resolving: total 1, reused 0, downloaded 0
Resolving: total 1, reused 1, downloaded 0, done
ERROR  EPERM: operation not permitted, open 'C:\Users\<UserName>\AppData\Roaming\npm\pnpm'

我想要的 要了解问题所在和解决方案。

  1. 有人可以解释这里发生了什么吗?
  2. 使用PNPM有哪些解决方案?
  3. 首先,当我启动第一个命令时,它可以正常工作,我可以调用pnpm --v正常,但是在第二个命令中,它的行为类似于我上面所说的。我应该放弃第二条命令并按原样使用PNPM吗?

1 个答案:

答案 0 :(得分:0)

使用MINGW64(或CMD)时出现相同的错误。然后通过Powershell安装了pnpm,就可以了。