Skip to content

Commit ef0b756

Browse files
committed
Account for uninstalled packages
This stems from the fact that we list stdlib deps in our package.json but they are not installed in the node_modules directory. Accordingly, when `read-installed` attempts to recurse, it is unable to find package.json files, and, instead of an object, the recursed value is a string.
1 parent 1b8a989 commit ef0b756

File tree

1 file changed

+3
-0
lines changed
  • lib/node_modules/@stdlib/_tools/licenses/licenses/lib

1 file changed

+3
-0
lines changed

lib/node_modules/@stdlib/_tools/licenses/licenses/lib/recurse.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ function recurse( cache, pkg ) {
5353
var id;
5454
var i;
5555

56+
if ( typeof pkg !== 'object' ) {
57+
return cache;
58+
}
5659
// Generate a unique identifier for the current package:
5760
id = pkg.name + '@' + pkg.version;
5861

0 commit comments

Comments
 (0)