Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,163,806 members, 7,855,399 topics. Date: Sunday, 09 June 2024 at 08:03 PM

Issue Which Nodejs And Npm After Installation - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Issue Which Nodejs And Npm After Installation (899 Views)

Bun: New Javascript Runtime Faster Than Nodejs and Deno / Please Help I'm Getting Errors Why Installing Npm On Termux / A Javascript/nodejs And Python/django Developer Needs Placement (2) (3) (4)

(1) (Reply) (Go Down)

Issue Which Nodejs And Npm After Installation by Epsstore: 2:33pm On Jan 26, 2020
When i type npm restart i get these error ...i have not created a directory also, how do i proceed

i use ubuntu Lts 16.04 and my home directory contains a file called nodejs.org and node_modules

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/nodejs', '/usr/bin/npm', 'restart' ]
2 info using npm@3.5.2
3 info using node@v4.2.6
4 verbose config Skipping project config: /home/Myname/.npmrc. (matches userconfig)
5 verbose stack Error: ENOENT: no such file or directory, open '/home/Myname/package.json'
5 verbose stack at Error (native)
6 verbose cwd /home/Myname
7 error Linux 4.15.0-45-generic
8 error argv "/usr/bin/nodejs" "/usr/bin/npm" "restart"
9 error node v4.2.6
10 error npm v3.5.2
11 error path /home/Myname/package.json
12 error code ENOENT
13 error errno -2
14 error syscall open
15 error enoent ENOENT: no such file or directory, open '/home/Myname/package.json'
16 error enoent ENOENT: no such file or directory, open '/home/Myname/package.json'
16 error enoent This is most likely not a problem with npm itself
16 error enoent and is related to npm not being able to find a file.
17 verbose exit [ -2, true ]
Re: Issue Which Nodejs And Npm After Installation by makavele: 4:46pm On Jan 26, 2020
npm commands are mapped to something already crafted in your package.json . . .

it cannot find the package.json file to see what npm restart is mapped to.

in other words, you don't have a node project sef to being with . . .

so what are you restarting?
Re: Issue Which Nodejs And Npm After Installation by Epsstore: 12:23am On Jan 27, 2020
makavele:
npm commands are mapped to something already crafted in your package.json . . .

it cannot find the package.json file to see what npm restart is mapped to.

in other words, you don't have a node project sef to being with . . .

so what are you restarting?

How come I have a nodejs.org folder and a node_modules folder on my home page
Re: Issue Which Nodejs And Npm After Installation by Epsstore: 12:24am On Jan 27, 2020
My screen shot when I type npm issues

Re: Issue Which Nodejs And Npm After Installation by bosman50(m): 5:32am On Jan 27, 2020
Npm was actually looking for a configuration file in a config directory but couldn't find it. There are work around... just point the app to where the directory is.
Or, better still, reinstall.... Use this
Npm install
And all will be fine
Try installing in your home directory to avoid issues with authentication
Re: Issue Which Nodejs And Npm After Installation by Epsstore: 9:06am On Jan 27, 2020
bosman50:
Npm was actually looking for a configuration file in a config directory but couldn't find it. There are work around... just point the app to where the directory is.
Or, better still, reinstall.... Use this
Npm install
And all will be fine
Try installing in your home directory to avoid issues with authentication

How do I point the app to the directory is the issue... Should I extract the content of nodejs.org folder to where? I still have a node_modules folder which contains two files jquery n bootstrap
Re: Issue Which Nodejs And Npm After Installation by SirLakes: 11:37am On Jan 27, 2020
Navigate to your working dir from terminal and do your npm whatever locally
Re: Issue Which Nodejs And Npm After Installation by bosman50(m): 6:10pm On Jan 27, 2020
Epsstore:


How do I point the app to the directory is the issue... Should I extract the content of nodejs.org folder to where? I still have a node_modules folder which contains two files jquery n bootstrap
Ok. I guess you are new to Unix system.
Within that nodejs .org, you should find a .tar file. Extract the contents and locate ,/bin directory
Within which lies the binaries of node and npm
. Move them to your home direct
ory to avoid permission wahala later.
Verify it works by using node -- version
And npm. --version

1 Like

(1) (Reply)

I Want Teacher For C++ / Advice Needed: Front-end Web Development Or Machine Learning? / I Built This Blog App Using Django - Please Give Feedbacks

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 18
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.