NODE_PATH 匹配 npm 根目录

NODE_PATH matches the npm root

当我尝试通过此命令使用 yeoman 构建项目时出现此错误。

npm install generator-gulp-webapp --global

错误:

Yeoman Doctor
Running sanity checks on your system

✖ NODE_PATH matches the npm root
npm global root value is not in your NODE_PATH

我正在使用 Ubuntu 15.04,还没有使用 sudo 命令安装 npm 和节点。

似乎是用

安装的
sudo npm install generator-gulp-webapp --global

解决了问题。

尝试使用 "Run as Administrator" 选项。它会起作用。