#Error message npm install

1 messages · Page 1 of 1 (latest)

turbid scarabBOT
#

<@&987246399047479336> please have a look, thanks.

turbid scarabBOT
#

While you are waiting for getting help, here are some tips to improve your experience:

Code is much easier to read if posted with syntax highlighting and proper formatting.

If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.

Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.

limpid oasis
#

npm in java ?

regal ermine
rocky forge
#

what did you run

junior locust
#

npm install

jaunty star
#

Java is not Javascript for one.

#

Second, did you run the command with administrator privileges?

junior locust
#

What do uou mean with administrator privileges?

jaunty star
#

Are you on windows or linux or anything else?

junior locust
#

mac

jaunty star
#

Administrator is the same as superuser but for windows
Try executing the command again, but put sudo before it

junior locust
#

Alr

warm hemlock
#

in your terminal do ls

#

is your package.json there?

#

for npm install to work, it needs to be run in the same directory as the package.json

jaunty star
junior locust
#

Yes

#

I have package-lock.json

jaunty star
#

that's- not the same..

#

do you have package.json?

junior locust
#

nope

warm hemlock
#

package-lock.json is what gets added when you do npm install

#

npm install downloads dependencies, if you don't have that, then why are you running npm install?

junior locust
#

How can I add package-lock.json

warm hemlock
#

you don't manually add or create that yourself

#

don't think about package-lock.json that just describes all your deps

jaunty star
#

Did you maybe mean to do npm init instead of npm install?

junior locust
#

No I did npm install

warm hemlock
#

why are you doing npm install?

#

what's ur thought process behind it?

junior locust
#

Homework 🙂

#

We are going to work with loopback 4

warm hemlock
#

Okay but that doesn't answer why you think you need to do npm install?

junior locust
warm hemlock
#

it's telling you what to do though

junior locust
#

I tried it

warm hemlock
#

what did u try

junior locust
#

The line with sudo chown -R....

#

Or should I do something else

warm hemlock
#

Did you cd into your project folder?

junior locust
#

cd?

warm hemlock
#

change directory, in the terminal

#

e.g. cd <path to project>

junior locust
#

Nope

warm hemlock
#

do that first

#

you need to be in the project folder for anything to work

junior locust
#

How can I do that

warm hemlock
#

i just told you

#

in your terminal type cd <path to project>

junior locust
#

O alr

warm hemlock
#

replace <path to project>, with the actual path

#

e.g. cd "C:\Users\John\Desktop\NPM Project"

junior locust
#

I got it!