这是我使用的命令:
➜ code npm ls
/Users/ravindrakumar/code
└── (empty)
➜ code npm ls -g
➜ code npm install coffee-script
npm http GET https://registry.npmjs.org/coffee-script
npm http 304 https://registry.npmjs.org/coffee-script
coffee-script@1.6.3 node_modules/coffee-script
➜ code npm rm coffee-script
unbuild coffee-script@1.6.3
➜ code npm install -g coffee-script
npm http GET https://registry.npmjs.org/coffee-script
npm http 304 https://registry.npmjs.org/coffee-script
/Users/ravindrakumar/code/Password:/usr/local/bin/coffee -> /Users/ravindrakumar/code/Password:/usr/local/lib/node_modules/coffee-script/bin/coffee
/Users/ravindrakumar/code/Password:/usr/local/bin/cake -> /Users/ravindrakumar/code/Password:/usr/local/lib/node_modules/coffee-script/bin/cake
coffee-script@1.6.3 /Users/ravindrakumar/code/Password:/usr/local/lib/node_modules/coffee-script
➜ code npm -g ls
/Users/ravindrakumar/code/Password:/usr/local/lib
└── coffee-script@1.6.3
➜ code ls Password:
usr
➜ code ls Password:/usr
local
➜ code ls Password:/usr/local
bin lib
➜ code ls Password:/usr/local/bin
cake coffee
➜ code ls Password:/usr/local/lib
node_modules
➜ code ls Password:/usr/local/lib/node_modules
coffee-script
➜ code rm -rf Password:
➜ code npm -g ls
➜ code
我尝试使用https://gist.github.com/nicerobot/2697848完全卸载节点,npm 但是重新安装后我又遇到了同样的问题。
我也在github中创建了一个问题,仍然没有回复 https://github.com/isaacs/npm/issues/3922