Reputation: 7390
I downloaded Node.js few minutes ago, uncompressed it under /usr/node , adjusted my PATH, ran npm install and got these errors. What could be the problem here?
bin $ npm install ws
/usr/node/bin
└── [email protected]
npm WARN enoent ENOENT: no such file or directory, open '/usr/node/bin/package.json'
npm WARN bin No description
npm WARN bin No repository field.
npm WARN bin No README data
npm WARN bin No license field.
bin $ pwd
/usr/node/bin
bin $ echo $PATH
/usr/lib64/qt-3.3/bin:/usr/lib64/ccache:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/usr/local/musl/bin:/opt/Qt/5.7/gcc_64/bin/:/home/niko/.local/bin:/home/niko/bin:/usr/local/musl/bin:/opt/Qt/5.7/gcc_64/bin/:/usr/node/bin
bin $
Upvotes: 0
Views: 346
Reputation: 1374
I just tried the same command following your steps, and did not get the error - probably the node version / platforms are not matching as that of yours.
By the way, there is no need of running the command from the bin folder, once you set up the path to node / npm, you could run it anywhere.
And as David suggested, please run npm init once.
Upvotes: 1
Reputation: 514
Try the following command first from your project's local directory
npm init
Upvotes: 2