diff --git a/lib/pack.js b/lib/pack.js index 78e5bfd174d7b..8189cb6cedc0b 100644 --- a/lib/pack.js +++ b/lib/pack.js @@ -4,6 +4,9 @@ // Packs the specified package into a .tgz file, which can then // be installed. +// Set this early to avoid issues with circular dependencies. +module.exports = pack + const BB = require('bluebird') const byteSize = require('byte-size') @@ -37,7 +40,6 @@ pack.usage = 'npm pack [[<@scope>/]...] [--dry-run]' // if it can be installed, it can be packed. pack.completion = install.completion -module.exports = pack function pack (args, silent, cb) { const cwd = process.cwd() if (typeof cb !== 'function') {