diff --git a/lib/commands/pack.js b/lib/commands/pack.js index fdde78f6afe23..aecd7301524ab 100644 --- a/lib/commands/pack.js +++ b/lib/commands/pack.js @@ -39,6 +39,7 @@ class Pack extends BaseCommand { const manifest = await pacote.manifest(spec, { ...this.npm.flatOptions, Arborist, + preferOnline: true, _isRoot: true, }) if (!manifest._id) { @@ -56,6 +57,7 @@ class Pack extends BaseCommand { foregroundScripts: this.npm.config.isDefault('foreground-scripts') ? true : this.npm.config.get('foreground-scripts'), + preferOnline: true, prefix: this.npm.localPrefix, workspaces: this.workspacePaths, })