A text selection has to start and end in text positions, i.e. inside textblocks. So 0 isn’t one, and doc.nodeSize isn’t even a valid position. In 0.11.0, you can use Selection.between(doc.resolve(0), doc.resolve(pm.doc.content.size)), but it appears that you’re using 0.10.0 or older.
I just tried to clone the git repo, and install it (so far so good), but it is not clear how to build a distribution from there (with ES5-compiled code). Is that described somewhere?
If you don’t want to hack on the editor itself, just install the prosemirror-* NPM modules that you need. Or use prosemirror-prebuilt for an easy start.
I’m now using the new version of prosemirror, but I’m still having problems wrapping my head around the problem of setting the selection to the entire document.