曾经执行过npm config set prefix 命令, 导致npm的config乱掉了, 找到这个文件.npmrc, 然后删掉就可以了 。 我的.npmrc位置在C:\Users\Administrator下。