npm WARN enoent ENOENT no such file or directory open C Users Niroj package json

0 votes

I just want to install socket.io to my project which is located on 3.chat folder. But when I run following command it shows following Warnings.And its not created a node_modules directory inside my project folder. How to fix this?

C:\Users\Niroj\Documents\NodeJS\3.chat>npm install socket.io
C:\Users\Niroj
`-- socket.io@2.0.3

npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\Niroj\package.json'
npm WARN Niroj No description
npm WARN Niroj No repository field.
npm WARN Niroj No README data
npm WARN Niroj No license field.
Oct 13, 2020 in Node-js by kartik
• 37,520 points
24,420 views

1 answer to this question.

0 votes

Hello @kartik,

If you already have package-lock.json file just delete it and try again.

Hope it helps!!

Thank You!!

answered Oct 13, 2020 by Niroj
• 82,840 points

Related Questions In Node-js

0 votes
1 answer

How do I add a custom script to my package.json file that runs a javascript file?

Hello @kartik, I have created the following, and ...READ MORE

answered Jul 16, 2020 in Node-js by Niroj
• 82,840 points
41,424 views
0 votes
1 answer

How to install a previous exact version of a NPM package?

Hello @kartik, If you have to install an ...READ MORE

answered Jul 8, 2020 in Node-js by Niroj
• 82,840 points
2,819 views
0 votes
1 answer

Error:npm WARN unmet dependency in nodejs

Hii @kartik, Following are the possible solution : Manually ...READ MORE

answered Jul 12, 2020 in Node-js by Niroj
• 82,840 points
6,335 views
0 votes
1 answer

How to clean node_modules folder of packages that are not in package.json?

Hello @kartik, You could remove your node_modules/ folder ...READ MORE

answered Jul 13, 2020 in Node-js by Niroj
• 82,840 points
30,339 views
0 votes
1 answer

jQuery AJAX fires error callback on window unload - how do I filter out unload and only catch real errors?

Hello, In the error callback or $.ajax you have three ...READ MORE

answered Apr 27, 2020 in Java-Script by Niroj
• 82,840 points
4,236 views
0 votes
1 answer

How do I pass command line arguments to a Node.js program?

Hello @kartik, If your script is called myScript.js ...READ MORE

answered May 5, 2020 in Java-Script by Niroj
• 82,840 points
3,280 views
0 votes
1 answer

Error:Issue when trying to use IN() in wordpress database

Hello @kartik, Try this code : // Create an ...READ MORE

answered May 8, 2020 in PHP by Niroj
• 82,840 points
1,151 views
+2 votes
1 answer

How do I debug Node.js applications?

Hello @kartik, Use node-inspector  from any browser supporting WebSocket. Breakpoints, ...READ MORE

answered Jul 8, 2020 in Node-js by Niroj
• 82,840 points
1,056 views
0 votes
1 answer

Error:npm WARN package.json: No repository field

Hello @kartik, It's just a check as of NPM ...READ MORE

answered Jul 20, 2020 in Node-js by Niroj
• 82,840 points
4,604 views
0 votes
1 answer

Error:/usr/bin/env: node: No such file or directory

Hello @kartik, You have to manually link to ...READ MORE

answered Oct 12, 2020 in Node-js by Niroj
• 82,840 points
7,235 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP