Skip to content

Commit fc3e5f5

Browse files
authored
Merge pull request #4 from facebook/next
Ensure workspaces key exists in parent package.json (facebook#3989)
2 parents fdb0e77 + 47d2d94 commit fc3e5f5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/react-scripts/config/paths.js

+3
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,9 @@ const getMonorepoPkgPaths = () => {
140140
if (monoPkgPath) {
141141
// get monorepo config from yarn workspace
142142
const pkgPatterns = require(monoPkgPath).workspaces;
143+
if (pkgPatterns == null) {
144+
return [];
145+
}
143146
const pkgPaths = findPkgs(path.dirname(monoPkgPath), pkgPatterns);
144147
// only include monorepo pkgs if app itself is included in monorepo
145148
if (pkgPaths.indexOf(appDirectory) !== -1) {

0 commit comments

Comments
 (0)