Skip to content

add default value for globPatterns #3989

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 7, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
add default value for globPatterns
without this, the latest alpha broke on start
```
/Users/adeviankakrisnafadlil/Projects/eurecah/node_modules/react-scripts/config/paths.js:130
    .reduce(
     ^

TypeError: Cannot read property 'reduce' of undefined
    at findPkgs (/Users/adeviankakrisnafadlil/Projects/eurecah/node_modules/react-scripts/config/paths.js:130:6)
    at getMonorepoPkgPaths (/Users/adeviankakrisnafadlil/Projects/eurecah/node_modules/react-scripts/config/paths.js:143:22)
    at Object.<anonymous> (/Users/adeviankakrisnafadlil/Projects/eurecah/node_modules/react-scripts/config/paths.js:155:55)
    at Module._compile (module.js:643:30)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3)
    at Module.require (module.js:587:17)
    at require (internal/module.js:11:18)
error Command failed with exit code 1.
```
  • Loading branch information
viankakrisna authored Feb 7, 2018
commit d3af56e11b83c52793018d289c47d8bddf25798a
2 changes: 1 addition & 1 deletion packages/react-scripts/config/paths.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ if (useTemplate) {

module.exports.srcPaths = [module.exports.appSrc];

const findPkgs = (rootPath, globPatterns) => {
const findPkgs = (rootPath, globPatterns = []) => {
const globOpts = {
cwd: rootPath,
strict: true,
Expand Down