aboutsummaryrefslogtreecommitdiff
path: root/deps/npm/lib/build.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/lib/build.js')
-rw-r--r--deps/npm/lib/build.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/deps/npm/lib/build.js b/deps/npm/lib/build.js
index c5ee76e5c8..1f2d2efceb 100644
--- a/deps/npm/lib/build.js
+++ b/deps/npm/lib/build.js
@@ -122,10 +122,10 @@ function shouldWarn(pkg, folder, global, cb) {
// current searched package is the linked package on first call
if (linkedPkg !== currentPkg) {
- if (!topPkg.dependencies) return cb()
-
// don't generate a warning if it's listed in dependencies
- if (Object.keys(topPkg.dependencies).indexOf(currentPkg) === -1) {
+ if (Object.keys(topPkg.dependencies || {})
+ .concat(Object.keys(topPkg.devDependencies || {}))
+ .indexOf(currentPkg) === -1) {
if (top && pkg.preferGlobal && !global) {
log.warn("prefer global", pkg._id + " should be installed with -g")