installing npm package.json giving me errors - node.js

This is just an example. But for example i was creating a react project through npm and it was saying it can't locate my package.json file... Any help will be greatly appreciated.. I will also post the code of the process in creating react project. It is happening when created any type of project. I have deleted Node+Npm and re installed it and it still giving me problems.
Thu Sep 2818:00:09React:Node 👽 npm start
npm ERR! path /Users/richardjimenez/school/React:Node/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open '/Users/richardjimenez/school/React:Node/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
Thu Sep 2817:51:50~ 👽 npm install --save latest-version
npm WARN saveError ENOENT: no such file or directory, open '/Users/richardjimenez/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/Users/richardjimenez/package.json'
npm WARN richardjimenez No description
npm WARN richardjimenez No repository field.
npm WARN richardjimenez No README data
npm WARN richardjimenez No license field.

You have a colon in your address which could be causing the issue.

Related

can't install node express on windows 10

I am trying to set up a node express development environment on windows 10. I have successfully installed node.js and npm but when I try to install express using:
npm init
npm install express
I get the following error:
npm WARN myapp#1.0.0 No description
npm WARN myapp#1.0.0 No repository field.
npm ERR! code ENOENT
npm ERR! syscall rename
npm ERR! path C:\Users\mi292519\Dropbox\selfLearning\nodeJs\myapp\node_modules\bytes
npm ERR! dest C:\Users\mi292519\Dropbox\selfLearning\nodeJs\myapp\node_modules\.bytes.DELETE
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\mi292519\Dropbox\selfLearning\nodeJs\myapp\node_modules\bytes' -> 'C:\Users\mi292519\Dropbox\selfLearning\nodeJs\myapp\node_modules\.bytes.DELETE'
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\mi292519\AppData\Roaming\npm-cache\_logs\2020-10-07T11_17_07_099Z-debug.log
I tried removing node_modules and package.json also tried deleting npm-cache and npm install again but none of that worked
any help would be appreciated
Thanks!

When I run npm install and npm start, it keeps coming up with the following messages

namish#namishs-mbp ~ % npm install
npm WARN saveError ENOENT: no such file or directory, open '/Users/namish/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/Users/namish/package.json'
npm WARN namish No description
npm WARN namish No repository field.
npm WARN namish No README data
npm WARN namish No license field.
up to date in 0.727s
found 0 vulnerabilities
I'm trying to run npm start after this. When I do, this is what happens:
namish#namishs-mbp ~ % npm start
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /Users/namish/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/Users/namish/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/namish/.npm/_logs/2020-08-15T01_15_06_560Z-debug.log```
I don't know why this says this. Is there any way to fix it?
Check the file location of your package.json and try again or use npm init to create one

Cannot install or start npm for react

Following error is been thrown when tried to install react.
npm ERR! path C:\Users\web\desktop\boy\package.json
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\web\desktop\boy\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\web\AppData\Roaming\npm-cache\_logs\2018-08-15T12_19_50_959Z-debug.log
npm install
npm WARN saveError ENOENT: no such file or directory, open 'C:\Users\web\desktop \boy\package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\web\desktop\bo y\package.json'
npm WARN boy No description
npm WARN boy No repository field.
npm WARN boy No README data
npm WARN boy No license field
When you type
npm run start
npm tries to find start in the scripts section of your package.json file.
As you don't have such file, npm fails with ENOENT, which is an abbreviation for Error NO ENTry.
Cheers.
Got the same issue but in the end, find out that the project is within another folder at the same place.
Demo project > My Project (containing node modules and files)
I was in the Demo project and trying to right npm start.

npm Error code ENOENT error no-4058 npm not being able to find a file

This problem is almost with every npm module installation.
I think it's something to do with SQLite 3 module because whenever I create a new project using npm init and install some module other than SQLite 3 like crypto-js or yargs etc it works.
But soon after I install SQLite 3, no other module can be installed and the following error occurs.
I have tried to search it everywhere but unable to find solution for this . I hope I'll find a solution here.
My Node version is v8.2.1 and npm version is 5.3.0. My operating system is Windows 8.1 Professional.
F:\name>npm install crypto-js --save
npm WARN todo-api#1.0.0 No description
npm WARN todo-api#1.0.0 No repository field.
npm ERR! path F:\name\node_modules\sqlite3\node_modules\node-pre-gyp\node_module
s\npmlog\node_modules\are-we-there-yet\node_modules\delegates
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename 'F:\name\node_modules\
sqlite3\node_modules\node-pre-gyp\node_modules\npmlog\node_modules\are-we-there-
yet\node_modules\delegates' -> 'F:\name\node_modules\sqlite3\node_modules\node-p
re-gyp\node_modules\npmlog\node_modules\are-we-there-yet\node_modules.delegates
.DELETE'
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\Usman Ahmad\AppData\Roaming\npm-cache_logs\2017-08-25T09_
49_02_538Z-debug.log

npm ERR! enoent ENOENT: no such file or directory, open package.json

I'm new to Node so bear with me.
I have a Node server which requires ws so I install it with:
$ npm install ws
/private/var/www/html/WebRTC/SVC
└─┬ ws#1.1.1
├── options#0.0.6
└── ultron#1.0.2
npm WARN enoent ENOENT: no such file or directory, open '/private/var/www/html/WebRTC/SVC/package.json'
npm WARN SVC No description
npm WARN SVC No repository field.
npm WARN SVC No README data
npm WARN SVC No license field.
I then run the server using:
$ npm run server.js
npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/Cellar/node/6.2.2/bin/node" "/usr/local/bin/npm" "run" "server.js"
npm ERR! node v6.2.2
npm ERR! npm v3.9.5
npm ERR! path /private/var/www/html/WebRTC/SVC/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open '/private/var/www/html/WebRTC/SVC/package.json'
npm ERR! enoent ENOENT: no such file or directory, open '/private/var/www/html/WebRTC/SVC/package.json'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
npm ERR! /private/var/www/html/WebRTC/SVC/npm-debug.log
but am getting errors mentioning no package.json.
Looking through npm-debug.log it seems pretty much the same.
Can someone shed some light on what enoent is and what sort of package.json file I need.
I was expecting this script to run out of the box so a little puzzled.
When you type
npm run server.js
npm tries to find entry named server.js in the scripts section of your package.json file (see npm docs on scripts for details).
package.json, simplified, describes your app's dependencies and environment.
As you don't have such file, npm fails with ENOENT, which is an abbreviation for Error NO ENTry.
Basically, in your case, you just want to node server.js to run your script.

Resources