Skip to content

Commit 1c61615

Browse files
authored
Merge pull request #903 from runspired/patch-1
fix: Provide a more meaningful error when whitelist entry is missing
2 parents f962f2e + 4ddd499 commit 1c61615

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

packages/fastboot/src/fastboot-schema.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,17 +189,19 @@ function buildWhitelistedRequire(whitelist, distPath, isLegacyWhitelist) {
189189
}
190190
} else {
191191
throw new Error(
192-
"Unable to require module '" + moduleName + "' because it was not in the whitelist."
192+
"Unable to require module '" +
193+
moduleName +
194+
"' in Fastboot because it was not explicitly allowed in 'fastbootDependencies' in your package.json."
193195
);
194196
}
195197
}
196198

197199
throw new Error(
198200
"Unable to require module '" +
199201
moduleName +
200-
"' because its package '" +
202+
"' in Fastboot because its package '" +
201203
packageName +
202-
"' was not in the whitelist."
204+
"' was not explicitly allowed in 'fastbootDependencies' in your package.json."
203205
);
204206
};
205207
}

0 commit comments

Comments
 (0)