problems and solutions
We will be done if...
- npx create-react-app is runs and completes successfully
- student can run the react app created by the above
- student can use apt to install more software
- The apt installed version of node the student has does not include npm.
- the node version is anyway quite old
- The students' laptop is ubuntu 19.04 - a version which reached end-of-life in jan 2020 so is not supported by default configs.
sudo apt-get update
doesn't work, etc
- rejected: Override the safety with --allow-unauthorised or --allow-insecure-repositories
- Update to 19.10
- Update to the new LTS: 20.04?
- Likely choosing this one eventually
- Risk: newer version may be too slow on student's machine. (consider install dual boot?)
- update sources.list to find these repos at
old-repositories.ubuntu.com
- done, for now
For one student I guided them through a completely fresh install of ubuntu.
For the others:
-
we sed-replaced the sources lists with old-repository.ubuntu.com references
- https://askubuntu.com/a/91821/12816
- Careful!
sudo sed -i -re 's/([a-z]{2}\.)?archive.ubuntu.com|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
-
sudo apt-get update
-
install curl with apt-get
-
we uninstalled nodejs using sudo apt-get remove nodejs
-
we used curl with these instructions to download and (unsafe) exexcute a script which
- https://github.com/nodesource/distributions/blob/master/README.md
- CAUTION!
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
- This configures the machine to have a 3rd-party ppa repository for binary node installs. (specifically we added one for v14)
-
we installed nodejs using sudo apt-get install nodejs
- this drew from the newly-added ppa
-
we then ran
npx create-react-app foo
- which completed successfully
-
we ran npm start in the relevant directory
- but it complained about trying to spawn CHROME and errored out
-
we set the environment variable in the user's
~/.bashrc
fileexport BROWSER=google-chrome
-
we ran npm start again success (but see later failure)
-
stopping and starting again, we ran out of inotify watchers
Default was 8000. Boosted to 100000 (not 500000) following this vscode linux setup guide: https://code.visualstudio.com/docs/setup/linux
- success (tested multiple start/stops and edits)