"create-react-app my-app" fails (react training tutorial)

I followed https://training.plone.org/5/react/bootstrap.html#installing-dependencies and immediately run into troubles:

~/workspace/sandbox$ mkdir react
~/workspace/sandbox$ cd react/
~/workspace/sandbox/react$ nvm install v8.11.3
v8.11.3 is already installed.
Now using node v8.11.3 (npm v5.6.0)
~/workspace/sandbox/react$ npm install -g yarn
/home/jensens/.nvm/versions/node/v8.11.3/bin/yarn -> /home/jensens/.nvm/versions/node/v8.11.3/lib/node_modules/yarn/bin/yarn.js
/home/jensens/.nvm/versions/node/v8.11.3/bin/yarnpkg -> /home/jensens/.nvm/versions/node/v8.11.3/lib/node_modules/yarn/bin/yarn.js
+ yarn@1.16.0
updated 1 package in 1.477s
~/workspace/sandbox/react$ yarn global add create-react-app
yarn global v1.16.0
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...

success Installed "create-react-app@3.0.1" with binaries:
      - create-react-app
Done in 1.02s.
~/workspace/sandbox/react$ create-react-app my-app
create-react-app: command not found

What is wrong here?

Seems the tutorial is outdated:
at https://facebook.github.io/create-react-app/docs/getting-started they write to use:

npx create-react-app my-app

And it works.

and the same is valid for https://training.plone.org/5/volto/bootstrap.html#bootstrapping-a-project, it must read as

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
nvm install v8.11.3
npx @plone/create-volto-app my-volto-app

It think yarn is not needed anymore.

Why do we stick to such an old version of node? Isnt it better to stick to the latest lts (--lts=dubnium -> v10.15.3) or at least to - if it has to be 8.x) --lts=carbon.

So it could be (even with newest nvm):

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh| bash
nvm install --lts
npx @plone/create-volto-app my-volto-app

Also, installing yarn with npm install -g yarn does not work for me.
What is working like a charm is curl -o- -L https://yarnpkg.com/install.sh | bash - which should work on all unix systems.

I think I'll create a PR on the training

@jensens Thanks for reporting and creating the PR. The docs was not been updated to use the lts and installation.
Also not sure why npm install -g yarn fail, though they show some deprecation warning. I have found that its better to use bash script or OS package manager to install yarn.https://github.com/yarnpkg/yarn/issues/1082#issuecomment-254026649
Not sure if this was the clear cut explanation.

FTR, PR is here https://github.com/plone/training/pull/414

Plone Foundation Code of Conduct