When I run the below code on node js I get warning 'no such file or directory, open 'C:\Users\username\package.json
npm install getstream --save
When I run the below code on node js I get warning 'no such file or directory, open 'C:\Users\username\package.json
npm install getstream --save
--save
tells npm to save the installed package version and name to the package.json
"dependencies"
object. If you don't have a package.json
within the directory running npm install
using the --save
flag you'll end up with this problem.
You'll need to call npm init
within your project directory prior to running npm install getstream --save
. npm init
will ask some questions about your project prior to creating the package.json
. If you don't want to answer the init questions, you can use the -f
flag to force default answers.