Have you been finding it difficult to work around your decagon labs and installing node.js on your laptop? It is actually easy. Follow along to see how to do that.
Go to the following links to test your skills on the above topics
Follow me carefully as we install the necessary things that would enable us to run the home study
Click on the link that would direct you to the google drive where the labs are located. You should be able to see something similar to the image below.
Click on the homestudyLabs and you would see a dropdown with some links. Click on the download link and a zip file containing the necessary folders and files will be downloaded.
After the zip file has been downloaded, unzip it and move to the next step.
Go to Node.js and download node.js for your PC.
If you are having issues or in doubt of how to download node.js, follow the tutorial on this website to learn how to download and install node on your system.
After installing node.js, you should have downloaded npm with it. So check whether it installed correctly by opening your command prompt (search cmd on your computer)
npm -v and check to see what it would show you. Type
node -v as well and your command prompt should show you something similar to the image below
With that completed, move to the next step
Download vscode or the editor of your choice. Google vscode if you do not have it installed and set up yet. You can find helpful guides on how to download vscode on the internet… google
Locate the unzipped Homestudy folder and right-click just like in the image below. You would see an option to open your folder with code.
If you cannot find this option, it is probably because you didn’t enable it when you were installing the Vscode but there are many ways to open a folder on vscode.
- You can drag the folder into the vscode program to open it
2. You can open the vscode program, click on the file on top of the toolbar and click the open folder option
After you have opened the folder on your vscode, you should see them shown like this in your vscode
Then click on the terminal on the toolbar to open a terminal or click
ctrl + shift + ` to open it.
When the terminal is open, type
pwd to confirm you are on the correct directory or folder.
confirm you are on the home study labs folder else use
cd / to navigate your way to the Homestudy directory
When you confirm your directory, type
npm install to begin installing dependencies.
It would take very little time and you should see something similar to the image below to confirm that your packages are downloaded completely.
Now, you should see node_modules among your folders on vscode and with that, you are good to go.
Open the lab you want to solve, for example, canBalance. Note: Do not open the canBalanceSolution.test.js because any tamper with that would affect your code as the tests might begin to fail.
Now you know how to set up your labs. Go ahead and solve them. Goodluck.