Refusing to delete /usr/local/bin/pnpm

當我試著要用 Hexo 來寫這個 blog 時,因為 npm 實在太慢

想說來更新 pnpm 下

結果發現我的 pnpm 也壞了

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
$ npm install -g pnpm
/usr/local/lib
└── (empty)
npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/Cellar/node/6.4.0/bin/node" "/usr/local/bin/npm" "install" "-g" "pnpm"
npm ERR! node v6.4.0
npm ERR! npm v3.10.3
npm ERR! path /usr/local/bin/pnpm
npm ERR! code EEXIST
npm ERR! Refusing to delete /usr/local/bin/pnpm: ../lib/node_modules/pnpm/bin/pnpm symlink target is not controlled by npm /usr/local
npm ERR! File exists: /usr/local/bin/pnpm
npm ERR! Move it away, and try again.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/es/Dev/Gitlog/npm-debug.log
npm ERR! code 1

所以我只好出動 rm 大法

1
2
3
4
5
$ ls -al /usr/local/bin/pnpm
lrwxr-xr-x 1 es admin 33 Jul 11 09:20 /usr/local/bin/pnpm -> ../lib/node_modules/pnpm/bin/pnpm
es@ess-MacBook-Pro ~/Dev/Gitlog
$ rm /usr/local/bin/pnpm

然後就好了