Node.js NPM全局包缺少依赖项

Node.js NPM全局包缺少依赖项,node.js,npm,gulp,node-modules,Node.js,Npm,Gulp,Node Modules,我在RHEL7.4上使用nodejs 6.11.4和npm 3.10.10。 我无法安装全局软件包,因为依赖关系未解决。 使用本地项目中使用的包,一切都按预期工作。 例如,当尝试安装gulp时,安装似乎成功(即使使用verbose参数): 但是当列出全局包时,依赖项显示为缺失 $ npm list -g /usr/lib ├─┬ gulp-cli@1.4.0 │ ├── UNMET DEPENDENCY archy@^1.0.0 │ ├── UNMET DEPENDENCY chalk@^1.1

我在RHEL7.4上使用nodejs 6.11.4和npm 3.10.10。 我无法安装全局软件包,因为依赖关系未解决。 使用本地项目中使用的包,一切都按预期工作。 例如,当尝试安装gulp时,安装似乎成功(即使使用verbose参数):

但是当列出全局包时,依赖项显示为缺失

$ npm list -g
/usr/lib
├─┬ gulp-cli@1.4.0
│ ├── UNMET DEPENDENCY archy@^1.0.0
│ ├── UNMET DEPENDENCY chalk@^1.1.0
│ ├── UNMET DEPENDENCY copy-props@^1.4.1
│ ├── UNMET DEPENDENCY fancy-log@^1.1.0
│ ├── UNMET DEPENDENCY gulplog@^1.0.0
│ ├── UNMET DEPENDENCY interpret@^1.0.0
│ ├── UNMET DEPENDENCY liftoff@^2.3.0
│ ├── UNMET DEPENDENCY lodash.isfunction@^3.0.8
│ ├── UNMET DEPENDENCY lodash.isplainobject@^4.0.4
│ ├── UNMET DEPENDENCY lodash.sortby@^4.5.0
│ ├── UNMET DEPENDENCY matchdep@^1.0.0
│ ├── UNMET DEPENDENCY mute-stdout@^1.0.0
│ ├── UNMET DEPENDENCY pretty-hrtime@^1.0.0
│ ├── UNMET DEPENDENCY semver-greatest-satisfied-range@^1.0.0
│ ├── UNMET DEPENDENCY tildify@^1.0.0
│ ├── UNMET DEPENDENCY v8flags@^2.0.9
│ ├── UNMET DEPENDENCY wreck@^6.3.0
│ └── UNMET DEPENDENCY yargs@^3.28.0
└─┬ npm@3.10.10
即使有包装(例如粉笔):

$ npm list -g
/usr/lib
├─┬ gulp-cli@1.4.0
│ ├── UNMET DEPENDENCY archy@^1.0.0
│ ├── UNMET DEPENDENCY chalk@^1.1.0
│ ├── UNMET DEPENDENCY copy-props@^1.4.1
│ ├── UNMET DEPENDENCY fancy-log@^1.1.0
│ ├── UNMET DEPENDENCY gulplog@^1.0.0
│ ├── UNMET DEPENDENCY interpret@^1.0.0
│ ├── UNMET DEPENDENCY liftoff@^2.3.0
│ ├── UNMET DEPENDENCY lodash.isfunction@^3.0.8
│ ├── UNMET DEPENDENCY lodash.isplainobject@^4.0.4
│ ├── UNMET DEPENDENCY lodash.sortby@^4.5.0
│ ├── UNMET DEPENDENCY matchdep@^1.0.0
│ ├── UNMET DEPENDENCY mute-stdout@^1.0.0
│ ├── UNMET DEPENDENCY pretty-hrtime@^1.0.0
│ ├── UNMET DEPENDENCY semver-greatest-satisfied-range@^1.0.0
│ ├── UNMET DEPENDENCY tildify@^1.0.0
│ ├── UNMET DEPENDENCY v8flags@^2.0.9
│ ├── UNMET DEPENDENCY wreck@^6.3.0
│ └── UNMET DEPENDENCY yargs@^3.28.0
└─┬ npm@3.10.10
$ ls -al /usr/lib/node_modules/gulp-cli/node_modules/chalk/
total 28
drwxrwxrwx   2 nobody mjoschko 4096 Oct 23 12:16 .
drwxrwxrwx 133 root   root     4096 Oct 23 12:16 ..
-rwxrwxrwx   1 nobody mjoschko 3154 Mar 29  2016 index.js
-rwxrwxrwx   1 nobody mjoschko 1119 Mar 28  2016 license
-rwxrwxrwx   1 nobody mjoschko 3141 Oct 23 12:16 package.json
-rwxrwxrwx   1 nobody mjoschko 6136 Mar 29  2016 readme.md