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
└─┬ [email protected]
├── [email protected]
└── [email protected]
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.
npm init
when you started the project?node server.js
instead ofnpm run server.js
.