Project based learning, react


Started project based learning and my code doesn’t want to display the contact card in Chrome I’ve tried deleting modules/packages, npm install, npm cache clean etc… my first try with the react app worked but this contact card doesnt want to execute. help would be appreciated thank you.

Yes I have, I also tried the npm start command. Although, I remember my command window having a powershell heading with the first app I created using vs code

Theres another error showing in my debug console “crbug/1173575, non-JS module files deprecated.”

This is the error I initially got

Do you have this code on github, so others can look at everything at once?

Regardless, whats your package.json? To see node.exe is a little suspicious, as usually its just node. Most resources assume you’re in some kind of Unix (Linux/Mac) based environment, but you’re in powershell, which is windows. This should be fine, just something to keep in mind as you debug.

Usually your start command looks like:

// package.json
{
  "scripts": {
    "start": "node src/index.js",
    //...
  },
  //...
}

If your using other tooling, the start command might look different, but do note that node is by itself the same way you’d call it in powershell.

No I don’t, this code is a tutorial iam using from github on a freecodecamp page.

Not use about package.json…I think it’s App.js

Thank you brad, i’ll ran that now

The code above does not execute in my node command window?

if you look at the screenshots above(top left), you will see my launch.json code is in a vscode folder. Why is that?

Should I delete vs and node and install them again?

Okay so I’ve managed to find the problem, it was because I used a debugging tool. None of them seem to be effective so I run without debugging, however, This is my current problem. Excuse the === false I figured that may be the problem, it should be true but it still didnt work


Did you import useState?

1 Like

No I have not, thanks

Where should I place it because its still giving a error

At the top of the file with the rest of the imports (if there are any).


Without seeing your code or you telling us what the error is we have no real way of knowing that is wrong.

Also, please post your code as code and not images, error messages can be images if needed.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around the code.

1 Like

Thank you. Id like to know how I can save my project link when completed?

I don’t understand the question. What do you mean by “save my project link”?

For use in other places, like a portfolio or to share

You need to build it and deploy it to some host.

1 Like

I suppose I need to have a domain for that?.. ill check it out thank you