V3.0 / Chapter 2 - No such module RxSwift

Already tried many of the approaches from other threads with no success

I’m trying with Xcode 10.1 by running ./bootstrap.sh from terminal
after that Xcode will open with this errors48%20PM

@scotteg anything you can advise this reader regarding using playgrounds?

Hi @jecht83 Really sorry you’re having this problem…still :pensive: Had hoped @freak4pc’s bootstrap file / approach was the silver bullet. It does work much better and I am not able to reproduce the problem you’re having, but here are some things you can try:

  1. Change the scheme destination to a simulator or device instead of My Mac
  2. Do steps 1-6 of these nuke and repave steps
  3. Download a new set of the project files

I have found that the latest Xcode playgrounds work fine now for new projects, but still seem to be problematic when opening projects created in older versions (:thinking:).

So, if all of the above steps do not resolve the issue for you, you could download this starter playground I created, which has RxSwift and RxCocoa added to it. This does not use the bootstrap script. Just be sure to build first every time you open it. And if you do use this starter playground throughout the book, also be sure to copy in any code and resources from the original playground for that chapter.

Good luck!

Hey, that’s very strange and unfortunate :frowning: I’ve actually tested on both Xcode 10.1 & 10.2.

Could you try ./bootstrap.sh clean perhaps? And also can you send the resulting build.log file ?

Thanks!

2 Likes

Hi @scotteg, @freak4pc thanks for reply

At the beginning I was trying with Xcode 10.2 so decided to download Xcode 10.1 and after that every time I tried to run the bootstrap.sh script it throws the error “Xcode not installed”

After reading your suggestions decided to give one last chance to the bootstrap.sh script before following your steps so I had to run “brew install swiftlin” to silence the waning of swiftlin then commented the lines 41-43 (Xcode check) of the script to run it and changed the scheme destination to simulator

And now it’s working :expressionless:

I really don’t know what was the issue or how it was fixed but it works

Thanks for your help and sorry for the late reply

build.log.zip (281 Bytes)

Not sure how SwiftLint is related - could you share more info so we could look on our side?

In regards to the Xcode check, I believe it’s because of the downgrading of Xcode.

Just for kicks, could you try in Terminal: xcode-select -p to see if it actually points somewhere?

You could also try running sudo xcode-select -s /Applications/Xcode.app to make sure the correct Xcode installation is selected.

I appreciate your patience and glad to hear things are looking good for you!:slight_smile:

Not sure how SwiftLint is related - could you share more info so we could look on our side?

I don’t think SwiftLint is related, just installed it to silence the warning from RxSwift

Untitled-1

Just for kicks, could you try in Terminal: xcode-select -p to see if it actually points somewhere?

/Library/Developer/CommandLineTools

Yup that is wrong. Could you run xcode-select like I mentioned to select the correct Xcode app?

yeah that worked, thank you so much for taking the time to answer on Saturday (at least on my location it is)

1 Like

You got it :slight_smile: !
Hope you keep enjoying the book :slight_smile:

I’m having the same problem and I am running Xcode 10.2. Does this not work with 10.2?

error: RxSwiftPlayground.playground:2:8: error: no such module 'RxSwift'
import RxSwift
       ^

@dchappelle Do you still have issues with this?

I just ran into the same problem as @dchappelle

I’ve tried all the steps listed above to fix it without success.

Same problem on chapter 11, I can’t use the playground at all. No solution yet from RW…

after running ./bootstrap.sh also got same problem on xcode 10.2 no such module ‘RxSwift’

1 Like

It seems that the their default simulator was iPhone 8 which is not available in my simulator list. So I fixed it by adding iPhone 8 to simulator list :sweat_smile:

1 Like

I solved this problem. Open Xcode preferences and go to locations. There is command line selection, select Xcode version. Then its working :slight_smile:

1 Like

@jacquesj Do you still have issues with this?

I tried downloading the starter playground with RxSwift and RxCocoa added. But the link is no longer active. Can you kindly post a new link ? Thanks.

Your recommendation in Episode 3 - the nuke and repave option - became my last resort for getting pods to install RxSwift. It didn’t work but maybe you can spot something I missed. BTW, your tutorial on RxSwift is thoughtfully-presented with just the right amount of silence and no annoying music!