How to fix npm start errors - node.js

I just downloaded a dashboard that uses react.js modules so when get to the dashboards source folder and try to run the command 'npm start' I get the error below:
I tried the following commands but it couldn't work
sudo npm -g uninstall node
npm install node
npm cache clean
sudo npm install -g npm
npm install
npm start
npm ERR! path /home/lamechd/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open '/home/lamechd/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /home/lamechd/.npm/_logs/2019-06-04T09_51_23_106Z-debug.log
NB/ Iam using manjaro Operating System based on archlinux

Related

Npm run server doest work/ cant run server with

command "npm run serve" doest work, and i get this:
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path C:\Users\user/package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\user\package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in: <>br
npm ERR! C:\Users\user\AppData\Local\npm-cache_logs\2022-02-24T23_43_08_331Z-debug-0.log
I tried reinstalling/ installing the node, npm, i tried and didnt work:
npm config set ignore-scripts false
It looks like you are executing NPM from your user home directory. You need to run it in a project directory, and then run npm init, along with the corresponding npm install <X> commands. Do not run init if the project is already initialized.

npm install throwing errors

The code throws the same error when npm install or npm install --save is called.
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /Users/andyc/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/Users/andyc/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/andyc/.npm/_logs/2021-11-04T02_19_18_554Z-debug.log
any idea why this is happening?
It seems you don't have package.json. So, you need to follow these steps, for every new project
Step: 1
npm init --yes
Step: 2
npm i --save 'packagename'
Step: 3 - When you delete and re-install packages by deleting node_modules, run this:
npm i/install

Trying to set up Angular application for the first time

I am having issues trying to get an angular framework setup to start a new project, and having some challenges. I installed node.js and as you can see I have v14.17.1 installed. when I try the command npm -g #angular/cli i get some errors that I don't know how to fix. Not sure what my next steps should be to help get this working. thanks.
C:\Users***\Documents\Codding\Angular>node -v v14.17.1
C:\Users*\Documents\Codding\Angular>npm -g #angular/cli npm ERR!
code ENOENT npm ERR! syscall open npm ERR! path
C:\Users*\Documents\Codding\Angular/package.json npm ERR! errno
-4058 npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users***\Documents\Codding\Angular\package.json' npm ERR! enoent
This is related to npm not being able to find a file. npm ERR! enoent
npm ERR! A complete log of this run can be found in: npm ERR!
C:\Users***\AppData\Local\npm-cache_logs\2021-06-23T11_15_18_924Z-debug.log
cmd promt errors
You have left out the "install" part of the npm command.
Try
npm install -g #angular/cli
Then, once that finishes, you can verify by running
ng version

WSL - Having issues when running npm install

I'm trying to run npm install on a project but I keep getting this error
npm ERR! code ENOENT
npm ERR! syscall chmod
npm ERR! path /home/mvargas/work-repos/red-keep/node_modules/#pm2/io/node_modules/semver/bin/semver
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, chmod '/home/mvargas/work-repos/red-keep/node_modules/#pm2/io/node_modules/semver/bin/semver'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /home/mvargas/.npm/_logs/2021-04-15T01_14_50_914Z-debug.log
I'm using WSL2 with Ubuntu 20.04lts, node version is 15.14.0 and npm version is 7.7.6
Solution: Downgraded to node 10

Trouble with installing Nodemon on Windows machine

I have been running into some issues while trying to install nodemon globally.
here's what it looks like:
$ npm i -g nodemon
npm ERR! code ENOENT
npm ERR! syscall lstat
npm ERR! path C:\Users\krishnna sarrdah\AppData\Roaming\npm
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, lstat 'C:\Users\krishnna sarrdah\AppData\Roaming\npm'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\krishnna sarrdah\AppData\Local\npm-cache\_logs\2021-01-22T16_04_35_377Z-debug.log
Your node installation is slightly out of date, I solved this problem with this
repair Node installation
npm update -g

Resources