Skip to content

Instantly share code, notes, and snippets.

@ra-kesh
Last active November 11, 2022 15:09
Show Gist options
  • Select an option

  • Save ra-kesh/26fab02402a9834d674be84c26d2e4c8 to your computer and use it in GitHub Desktop.

Select an option

Save ra-kesh/26fab02402a9834d674be84c26d2e4c8 to your computer and use it in GitHub Desktop.
Debugging for Level Zero

Introductions

Bello! neoGrammers..👋

Things to keep in mind before asking for help

  • You have watched the video and understand the code to best of your ability.

  • If you haven't , Click here to open the playlist

  • You have read and "Googled" the error properly

  • You have pushed the code to github, repl or codesandbox for peer review

  • You have gone through the list of possible debugging method as mentioned below

The procedure for asking help

  • Post the questions on #general-coding or #ask-anyone channel only

  • Clearly describe the problem and what did you do to troubleshoot

  • Don't forget to share the link to the code

  • Don't run away after posting your questions , wait sometime as there might be additional questions

  • Don't forget to update the status after getting the solution

Week ONE (The CLI app)

1. Issues Related to NPM Packages: {{ package-name }} is not defined / not found

NPM

Possible solutions

  • make sure you have spelled the package name correctly
var readlineSync= require ('readline-sync');
  • make sure your package.json file have the required file installed

package.json

  • If any package is not installed automatically in REPL, you can add it manually too

package manually

2. Issues Related to using NPM Package functionality

chrome_hoTgbcf3aT.png

Possible solutions

Other Frequently asked questions

  1. How to declare multiple choice questions?

    • Using keyInSelect from 'readline-sync'Package . You can find out more about it here
  2. How to print star patterns for assignments ?

    • let me guess you have tried it already and it ended up looking something similar to this

      chrome_KhtkEsYZh0.png

    • It is because console.log ( ) prints in a new line by default for every iteration of loop .

    • So you need to take that outside of the loop and add "*" to a variabale within the second loop after declaring it in first .

    • If you still can't do it , this code might help .

  3. How to share the Repl links to friends ?

    • By Adding ?embed=1&output=1to the URL after removing index.js from it. For Example look below
      https://repl.it/@r4k3sh/nc-assignment-2?embed=1&output=1
    

How to submit & re-submit

  • Go to #bot-spam
  • type /nc -p1 {{repl link}} for first project
  • type /nc -p2 {{repl link}} for second project
  • you will be greeted with a confirmation message if eveything goes well
  • to resubmit type /nc -p1R {{repl link}} & /nc -p2R {{repl link}} respectively

Some key concepts to understand

to be written...

Week TWO - part ONE (Github & Netlify)

1. Issues Related to Github Desktop

github error.png

Possible solutions

Sometimes the repo is already being managed by Git which results in this type of error . It's important to remember here that this is certainly not the only way to create a repository .

You can create a folder at any path according to your choice and navigate to that using vscode or you can go inside the folder and open vscode by right clicking on it.Then initiate the git within it .

2.Pushing REPL files directly to github

You can find a Comprehensive Guide about it Here

3.Using Github CLI for linux and 32bit Pc

You can checkout following tutorials for using the github in terminal

If you are trying to use Github Desktop unofficially in ubuntu ,Please keep in mind it won't let you sign-in.

4. "Page Not Found" error in netlify

chrome_xxbU30NZrO.png

Possible solutions

Make sure you have named your main html file as index.html.

Some key concepts to understand

to be written...

Week TWO - part TWO (Portfolio)

1. Changes in css file not showing on the page locally

Possible solutions

  • Make sure you have linked your css file to html file .
  • Make sure there's no spelling mistakes like stylesheets .
  • Make sure the relative path is same .

for example :

Case 1

If both html and css files are in same folder then it should be like

<link rel="stylesheet" href="style.css">

Case 2

if the css file in css folder then it should be like

<link rel="stylesheet" href="/css/style.css">

2 . You have pushed the changes in css file to server but it's not showing in your browser

Possible solutions

  • It may be happening due to browser's already cached css . So to reload the css, enter CTRL+F5 or try viewing the site in different browser or incognito mode .

Week THREE (The VANILA js app)

1. Script is not executing

Possible solutions

  • If you are using windows then try removing the type = text/javascript from script tag.
 <script src="app.js"></script>

2. Script is executing without clicking the translate button

Possible solutions

Make sure you are using only name of the callback function without the "()"

  btnTranslate.addEventListener("click", clickHandler)

3. "Something wrong with server" Error while fetching

chrome_dJ12ChSHLn.png

Possible solutions

  • first make sure it is not 429 error by going through console.
  • Then make sure there is no unnecessary space or character in ?text=
  • fetch url must be looking similar to below url
https://api.funtranslations.com/translate/minion.json?text=

Week FOUR (The React app)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment