diff --git a/lib/utils/tar.js b/lib/utils/tar.js index 31f8bb089ed85..1f978a8029f02 100644 --- a/lib/utils/tar.js +++ b/lib/utils/tar.js @@ -59,7 +59,7 @@ const getContents = async (manifest, tarball) => { totalEntries++ totalEntrySize += entry.size const p = entry.path - if (p.startsWith('package/node_modules/')) { + if (p.startsWith('package/node_modules/') && p !== 'package/node_modules/') { const name = p.match(/^package\/node_modules\/((?:@[^/]+\/)?[^/]+)/)[1] bundled.add(name) }