diff --git a/node_modules/npm-packlist/lib/index.js b/node_modules/npm-packlist/lib/index.js index 2d6504d74302..887018bd7d42 100644 --- a/node_modules/npm-packlist/lib/index.js +++ b/node_modules/npm-packlist/lib/index.js @@ -384,6 +384,11 @@ class PackWalker extends IgnoreWalker { // get a reference to the node we're bundling const node = this.tree.edgesOut.get(dep).to + // if there's no node, this is most likely an optional dependency that hasn't been + // installed. just skip it. + if (!node) { + continue + } // we use node.path for the path because we want the location the node was linked to, // not where it actually lives on disk const path = node.path diff --git a/node_modules/npm-packlist/package.json b/node_modules/npm-packlist/package.json index c3ad7d2c26a3..6023ad34df3b 100644 --- a/node_modules/npm-packlist/package.json +++ b/node_modules/npm-packlist/package.json @@ -1,6 +1,6 @@ { "name": "npm-packlist", - "version": "7.0.3", + "version": "7.0.4", "description": "Get a list of the files to add from a folder into an npm package", "directories": { "test": "test" diff --git a/package-lock.json b/package-lock.json index 71f3ec173100..91ffc5aaddb3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -168,7 +168,7 @@ "@npmcli/template-oss": "4.11.0", "licensee": "^9.0.0", "nock": "^13.2.4", - "npm-packlist": "^7.0.3", + "npm-packlist": "^7.0.4", "remark": "^14.0.2", "remark-gfm": "^3.0.1", "remark-github": "^11.2.4", @@ -9669,9 +9669,9 @@ } }, "node_modules/npm-packlist": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-7.0.3.tgz", - "integrity": "sha512-a/TxELNw489Y7ZzXe7lRoXhKErNNgguYgBdW8nPXLcPMnMOCANiEjCwC1XDH6/5K6hkjuTrEkwtoT9C/zX3jRg==", + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-7.0.4.tgz", + "integrity": "sha512-d6RGEuRrNS5/N84iglPivjaJPxhDbZmlbTwTDX2IbcRHG5bZCdtysYMhwiPvcF4GisXHGn7xsxv+GQ7T/02M5Q==", "inBundle": true, "dependencies": { "ignore-walk": "^6.0.0" diff --git a/package.json b/package.json index 3277dc16f4ef..2891df92b3b4 100644 --- a/package.json +++ b/package.json @@ -201,7 +201,7 @@ "@npmcli/template-oss": "4.11.0", "licensee": "^9.0.0", "nock": "^13.2.4", - "npm-packlist": "^7.0.3", + "npm-packlist": "^7.0.4", "remark": "^14.0.2", "remark-gfm": "^3.0.1", "remark-github": "^11.2.4",