3 Flashcards
(483 cards)
12.
S
What does nvm stand for?
Node version manager.
What is a nvm?
A simple way in the terminal for us to switch node versions.
What is npx?
A package runner tool that comes with npm 5.2.
What does npx do?
It runs a command of a package without installing it explicitly.
npx runs a command of a package without installing it explicitly. What does this mean?
Before we had npx we had to run
npm install -g create-react-app
Then we ran the create react app command to create our app.
create-react-app my-app
npx allows us to not install this global version of create-react-app and just simply run that one command to create our app.
How can you get older documentation of React?
By clicking on the version number in the Navbar of the site.
What can you do if you’re unable to get the create-react-app started?
You can use a code sandbox to use React in the browser.
https://codesandbox.io/s/new
13.
E
What is recommended after installing VSCode?
Add the code shell command to your terminal.
How do you add the code shell command to your terminal?
hold cmd shift P. Then type command. Here, you’ll see ‘Shell Command: Install ‘code’ command in PATH’. Click that and it will install the code command to your path.
What happens when you have your path setup?
You’re now able to use the code dot command to open up files and folders inside of your terminal.
What is the terminal?
The terminal is going to be the main way we navigate around our application as well as modify our files.
How can you install node?
The easiest way is to use nvm.
How do you install nvm?
Go to (link in resource folder). When you get to the link, scroll down to the the section called 'Installation and Update'. Copy the line of code and paste it into the terminal. This will clone down the nvm package and add it to your existing shell, which is the thing we're running inside of our terminal. NOTE: When you have nvm we have to close the terminal and relaunch it.
What should you do when you first install nvm?
Type in command -v nvm to check if it installed correctly.
NOTE: If you see nothing listed this means that nvm isn’t yet loaded to our shell.
Where can we find information that helps us when we install and check the version of nvm but nothing gets listed?
Scroll down on the webpage we used to find the line of code that we used to install nvm in the terminal and find the section on ‘nvm: command note found’.
What should you do if you don’t see anything listed after installing and checking the version of nvm?
First check to see if we have a bash profile.
How can we check to see if we have a bash profile?
By simply typing nano ~/.bash_profile. If after pressing enter nothing happens meaning there is no bash profile, instead of nano replace it with touch and then run nano ~/.bash_profile again.
What does touch do when entered in the terminal? (with ~/.bash_profile?)
It will open a new bash profile for you.
What do you do when you’re inside of the bash profile?
If at the bottom we see nothing that relates to nvm we need to run the line (from to website) of running
source ~/.bashrc
How would you save…….
Press cmd + x and then y and lastly enter.
What do you do after you’ve ……
type source ~/.bash_profile
What does typing source ~/.bash_profile in the …. do?
It uploads and reruns our bash profile that we just made made changes to.