Skip to content

Commit 4d85d6e

Browse files
committed
Fix GitbookIO#1267: don't fail when "node_modules" folder doesn't exist
1 parent cc9274c commit 4d85d6e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/plugins/findInstalled.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ function findInstalled(folder) {
6363

6464
// List all folders in node_modules
6565
return fs.readdir(node_modules)
66+
.fail(function() {
67+
return Promise([]);
68+
})
6669
.then(function(modules) {
6770
return Promise.serie(modules, function(module) {
6871
// Not a gitbook-plugin

0 commit comments

Comments
 (0)