npm install
/ npm install -g
command is not working in Windows 7
Node.js is installed properly, node.js version is v0.10.28
Couldn't read dependencies
ENOENT, open '"filepath"\package.json'
This is most likely not a problem with npm itself.
npm can't find a package.json file in your current directory.
By default, npm install will install all modules listed as dependencies in package. json .
This cause of this error is that one of the dependencies you define in your package. json file fails to be installed properly on your computer. This means that npm fails to install the node-sass module that's added as a dependency to the n-app project.
You don't say what module you want to install - hence npm looks for a file package.json
which describes your dependencies, and obviously this file is missing.
So either you have to explicitly tell npm which module to install, e.g.
npm install express
or
npm install -g express-generator
or you have to add a package.json
file and register your modules here. The easiest way to get such a file is to let npm create one by running
npm init
and then add what you need. Please note that this does only work for locally installed modules, not for global ones.
A simple example might look like this:
{ "name": "myapp", "version": "0.0.1", "dependencies": { "express": "4.0.0" } }
or something like that. For more info on the package.json
file see its official documentation and this interactive guide.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With