Npm install ERROR on Mac

Hello! I am trying to install npm on my Mac Air and I get the following error:

Janezs-MacBook-Air:myProject janezursej$ npm ls -gp --depth=0 | awk -F/ ‘/node_modules/ && !//npm$/ {print $NF}’ | xargs npm -g rm

Janezs-MacBook-Air:myProject janezursej$ npm install

npm WARN saveError ENOENT: no such file or directory, open ‘/Users/janezursej/myProject/package.json’

npm WARN enoent ENOENT: no such file or directory, open ‘/Users/janezursej/myProject/package.json’

npm WARN myProject No description

npm WARN myProject No repository field.

npm WARN myProject No README data

npm WARN myProject No license field.

up to date in 0.466s

found 0 vulnerabilities

Can somebody help?


Probably this at a guess and a quick Google



I have already seen that topic and it did not help me, as I think I have a different problem. Could I please get some more help?


V V pet., 18. sep. 2020 ob 01:32 je oseba Alex via Codecademy Forums <> napisala:


Did you try following some of the suggestions that the link provided, like typing npm init -y or npm init? What were the error messages after this?

What makes you think the error is different? It looked identical to me?

It actually might be the same error, I am sure you are right, thanks for writing back. The problem is, I do not know where to start learning about this - while following JavaScript Course, it was easy to go on. But now, suddenly I am supposed to know how to use my own Terminal and Node Package Manager in order to follow the course. Its a bit overwhelming and surely, I could go and read about all this myself but that is why I went for Codecademy in the first place - to have somebody to lead me so I am not completely on my own because I know I could not make it.

There is a massive comment about Node Package Manager in this page but I do not understand it:

And when the guy with the problem writes that “he tried this”, I do not even know how he came to the idea to try that - I believe in this case he already has got some experience using his Terminal, right? Also, he writes he managed to install ‘npm’ on a Mac via the terminal and is trying to install sass-mq. That does not look like the problem I have, as I have not been able to install ‘npm’ yet.

**package name: (sass-mq) media-queries-nikhil**
version: (1.0.0) 
git repository: 
license: (ISC) 
About to write to /Users/nikhil/package.json:

V V sob., 19. sep. 2020 ob 18:41 je oseba Alex via Codecademy Forums <> napisala:

Hello, thanks for reaching out - I wrote ‘npm init’ and it says this:

This utility will walk you through creating a package.json file.

It only covers the most common items, and tries to guess sensible defaults.

See npm help init for definitive documentation on these fields

and exactly what they do.

Use npm install <pkg> afterwards to install a package and

save it as a dependency in the package.json file.

Press ^C at any time to quit.

package name: (janezursej)

I do not know what to do next, there is surely no error here. I guess I should go reading about all this because I am lost. I was expecting Codecademy to make an introduction or something so I do not have to look for the problem by educating myself about the whole terminal usage and Node before I can proceed with JavaScript course. It would be very time consuming…

I am very thankful for any help!

V V sob., 19. sep. 2020 ob 18:19 je oseba pitabread via Codecademy Forums <> napisala:

I also wrote npm init -y and got this:

Wrote to /Users/janezursej/package.json:


“name”: “janezursej”,

“version”: “1.0.0”,

“main”: “index.js”,

“dependencies”: {

“package-name”: “^0.1.0”


“devDependencies”: {},

“scripts”: {

“test”: “echo “Error: no test specified” && exit 1”


“author”: “”,

“license”: “ISC”,

“keywords”: ,

“description”: “”


Janezs-Air:~ janezursej$

V V sob., 19. sep. 2020 ob 18:19 je oseba pitabread via Codecademy Forums <> napisala:

Ok, that’s already a little more to work with. Installations in the terminal are hard to explain and plenty can go wrong. When I started it out it was hard for me. What I do find helps is to learn a little bit about the command-line environment.

But back to the problem. Let’s try this:
If you type npm -v does anything happen?


Absolutely, I’d expect CC to go through this content too. Perhaps @codecademy can point you towards where these materials are

Hi! I am in contact with pitabread via Codecademy at the moment! Thanks for reaching out! I hope I get it solved soon!


V V ned., 20. sep. 2020 ob 17:12 je oseba Alex via Codecademy Forums <> napisala:

1 Like

Exactly, I am sure it does help to learn more about command-line environment! That is why I will of course be even more thankful if I will be able to get around it with your help as I believe there must be a way to learn about it through Codecademy, right?

Typed npm -v

I got 6.14.6

V V ned., 20. sep. 2020 ob 14:04 je oseba pitabread via Codecademy Forums <> napisala:

1 Like

Great! -v is a flag to check what version you have installed. If you get a number that means that npm is already installed :slight_smile:

Here’s a link to the CC command-line course. I personally found it to be confusing when I did it, but I still learned something. Fast-forward to now and with other experience I feel ok with the command-line:

1 Like

Hi! Thank you so much for your answer! I will check this link out now!

All the best,

1 Like

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.