issues installing
- Node.js Version: v8.9.4
- OS: MAC 10.13.3
- Scope (install, code, runtime, meta, other?): install
sh-3.2# npm install npm WARN saveError ENOENT: no such file or directory, open '/Users/charlescarter/package.json' npm WARN enoent ENOENT: no such file or directory, open '/Users/charlescarter/package.json' npm WARN charlescarter No description npm WARN charlescarter No repository field. npm WARN charlescarter No README data npm WARN charlescarter No license field.
// I am an example of JS code
// please remove me too
-->
- what are you trying to install?
- what is there in your current folder? what does
ls -lrtsay?
Based on the output above, it appears that the 'npm' tool is working as its designed based on its documented behaviour here.
Without any other arguments except the 'install' verb, it would examine the current directory for a package.json file as the specification of what other npm module dependencies need installation. The ENOENT error literally means 'No Entity' : that is, "no such file" was found locally in the current working directory for the package.json.
Apart from @gireeshpunathil enquiring what you were attempting to install, you might also consider whether you were in the right directory for your project to execute the command above - the output suggests you were in your/a user's home directory. Might you have intended to be in a different directory? One containing a package.json for your project?
Alternatively, did you perhaps intend instead to 'init'-ialise a new project in that directory? (see https://docs.npmjs.com/cli/init ) That would generate a package.json in the current directory after interviewing you for your intentions for a new project (assuming you had write permissions, which in your local directory you normally would).
ping @ckcjam
closing due to inactivity, please re-open if it is still outstanding, but with required data