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,530 points
10,341 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,880 points

Related Questions In Node-js

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,880 points
1,370 views
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,880 points
9,232 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,880 points
1,106 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,880 points
1,678 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,880 points
2,008 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,880 points
1,605 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,880 points
241 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,880 points
253 views
0 votes
1 answer

Error:npm WARN package.json: No repository field

Hello @kartik, If you are getting this from ...READ MORE

answered Jul 9, 2020 in Node-js by Niroj
• 82,880 points
2,749 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,880 points
2,009 views