Skip to content
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

fix-script fails if no debug configuration given #37

Open
kevinsperrine opened this issue Mar 12, 2018 · 6 comments
Open

fix-script fails if no debug configuration given #37

kevinsperrine opened this issue Mar 12, 2018 · 6 comments

Comments

@kevinsperrine
Copy link

Steps to reproduce the behavior

Install plugin, but do not enter any Debug entries in package.json

  "xcodeSchemes": {
    "Release": ["ReleaseAlpha", "ReleaseBeta"]
  }

Expected behavior

fix-scripts to run successfully. This can be fixed by passing an empty array into debug.

  "xcodeSchemes": {
    "Debug": [],
    "Release": ["ReleaseAlpha", "ReleaseBeta"]
  }

Actual behavior

/Users/chuck/Projects/aramis/node_modules/react-native-schemes-manager/src/fix-libraries.js:33
                for (const destinationBuildConfig of mappings[sourceBuildConfig]) {
                                                             ^

TypeError: mappings[sourceBuildConfig] is not iterable
    at updateProject (/Users/chuck/Projects/aramis/node_modules/react-native-schemes-manager/src/fix-libraries.js:33:48)
    at utilities.updateProjectsMatchingGlob (/Users/chuck/Projects/aramis/node_modules/react-native-schemes-manager/src/fix-libraries.js:86:10)
    at getFilesMatchingGlob (/Users/chuck/Projects/aramis/node_modules/react-native-schemes-manager/src/utilities.js:70:8)
    at glob (/Users/chuck/Projects/aramis/node_modules/react-native-schemes-manager/src/utilities.js:45:5)
    at f (/Users/chuck/Projects/aramis/node_modules/once/once.js:25:25)
    at Glob.<anonymous> (/Users/chuck/Projects/aramis/node_modules/glob/glob.js:151:7)
    at Glob.emit (events.js:160:13)
    at Glob._finish (/Users/chuck/Projects/aramis/node_modules/glob/glob.js:197:8)
    at done (/Users/chuck/Projects/aramis/node_modules/glob/glob.js:182:14)
    at Glob._processGlobStar2 (/Users/chuck/Projects/aramis/node_modules/glob/glob.js:637:12)
@thekevinbrown
Copy link
Owner

The thing about this is you don't actually need React Native Schemes Manager for release schemes as far as I'm aware. I'm happy to accept PRs to fix this, but that's why I haven't gone very deep in supporting this scenario.

@Thunderbird7
Copy link

Thunderbird7 commented Apr 4, 2018

Try remove yarn.lock and run yarn again.

@lc3t35
Copy link

lc3t35 commented Aug 11, 2018

+1, maybe just indicate in README that Debug: [] should be at least added in xcodeSchemes

"xcodeSchemes": {
    "Debug": [],
    "Release": []
  }

script can run without "mappings[sourceBuildConfig] is not iterable" error with this config

@hasanen
Copy link

hasanen commented Sep 16, 2018

Got the same error TypeError: mappings[sourceBuildConfig] is not iterableand @lc3t35 suggestion to add empty array for ´Debug` fixed it.

@kevinEsherick
Copy link

Happened to me as well and the above fix worked. I can submit a PR to make a note in the README if you'd like, I think that would be enough to close this.

@thekevinbrown
Copy link
Owner

@kevinEsherick that'd be great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants