这个方法已经有人介绍了,我就不多写了。原文看链接 npm install anywhere -g //如果不行,前面加sudo,反正我是没用上; http://blog.csdn.net/gxz1989611/article/details/38826101