| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Before attending the training, please make sure you install the code (not just clone) and run it to make sure it works. The most common problems for not being able to install and run are related to network configurations at the workshop venue like proxies. If your having these or other issues see the Troubleshooting section below.
If you have any problems with these steps, make sure you see the Troubleshooting section below.
Need to install Git? - http://git-scm.com/downloads
Need to install Node? We recommend using NVM (Node Version Manager) instead of installing from source. Installing from source works, but it's difficult to maintain your node version later on (which is why nvm exists). Please see the Windows section for a different install process.
Also know that NPM gets installed automatically when you install Node
Windows Users! Please read the Windows Users section below for installing NVM, Node, and WSL.
If you need to verify that you have NVM installed: nvm --version. Then install Node:
# Installs latest LTS version of node
# See this page for more install options: https://github.com/nvm-sh/nvm#usage
$ nvm install node
# If you can, try to use Node v20 or higher
# lists out the versions of node that you're managing with nvm including
# which one is the current one in your CLI
$ nvm listVerify you have Git, Node, and NPM installed. Installing Node will install NPM.
$ git --version
$ node --version # If you can, try to use Node v20 or higher
$ npm --versionYou don't necessarily need the latest version of Node for this workshop.
Then clone, install, and run the app:
# Clone the repo to your local machine (This just clones, it does not "install")
$ git clone https://github.com/ReactTraining/javascript-node-workshop.git
# Whichever directory you run the above command from, that directory should
# now have a folder called `javascript-node-workshop`.
# Change directory to the `javascript-node-workshop` folder:
$ cd javascript-node-workshop
# Install and run. Make sure you do these two commands from within the `javascript-node-workshop` folder:
$ npm install
$ npm start
# If you have issues, read below.You should be able to run npm start and see a welcome message. If you do, you're all set for the workshop.
If something goes wrong, you may need to see the Troubleshooting section below. We even have a special section for Windows Users
A few common problems:
$ git config --global url."https://".insteadOf git://
# This adds the following to your `~/.gitconfig`:
[url "https://"]
insteadOf = git://$ nvm use default stable$ sudo rm -rf node_modules
# If you installed node with nvm (suggested):
$ sudo rm -rf ~/.npm
# If you installed node with Homebrew:
$ sudo rm -rf /usr/local/lib/node_modules
# Then (look ma, no sudo!):
$ npm installThere are two days to get NVM (Node Version Manager) -- the "Windows" way and the "Linux" way. Lots of open source command-line tools are written for Linux (Unix) systems so they might be problematic when we try to use their Windows way to do it. But if you can get it to work, it's probably the most simple approach. To use NVM for Windows, follow their instructions here: https://docs.microsoft.com/en-us/windows/dev-environment/javascript/nodejs-on-windows
You can use use Windows Subsystem for Linux (WSL) instead of GitBash or PowerShell and essentially host a Linux environment on Windows. This way is a little more involved but we've had lots of success with our Windows audience in our workshop when they do the WSL approach.
From their docs:
"There are multiple ways to install Node.js. We recommend using a version manager as versions change very quickly. You will likely need to switch between multiple versions based on the needs of different projects you're working on"
They will recommend you install nvm (Node Version Manager). We agree!
Not using WSL can have a few problems that might arise in a Windows Environment:
If you're a Windows user who already does active JS/Node development then you should be good-to-go. Otherwise this section might be able to help.
Consider using VSCode (A lightweight version of Visual Studio) for our workshops as it is probably more appropriately suited for modern JavaScript development than Visual Studio, Eclipse, IntelliJ, etc. It has a terminal built-in which uses PowerShell by default, but you can configure it to use WSL which is what we recommend.
If you want, you can go into Windows' settings to turn on file extensions. In JavaScript projects, it's common to have a filename like .gitignore which would be difficult to see without extensions turned on. It's not required though.
If these instructions for Windows users can be improved, please let us know or make a PR!
This material is available for private, non-commercial use under the GPL version 3. If you would like to use this material to conduct your own workshop, please contact us at hello@reacttraining.com.
| Back | FazBrowse Home | New Git URL |