Sunday, June 2, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  10] [ 7]  / answers: 1 / hits: 106067  / 11 Years ago, fri, august 23, 2013, 12:00:00

I wanted to start a Node app and created a package.json file with a tutorial. Here is the json file:



{
name: Dashboard,
version: 0.0.0,
description: Client-A Dashboard,
dependencies: {
socket.io: latest,
express: latest,
jade: latest
},
author: tD
}


I verified JSON file before trying to run it, but still I got an error message when I ran the npm install command:



npm ERR! install Couldn't read dependencies
npm ERR! Error: ENOENT, open 'C:projectsClient-ALivepackage.json'
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <[email protected]>

npm ERR! System Windows_NT 6.1.7601
npm ERR! command C:\Program Files (x86)\nodejs\\node.exe C:\Program Files (x86)\nodejs\node_modules\npm\bin\npm-cli.js install
npm ERR! cwd C:projectsClient-ALive
npm ERR! node -v v0.8.22
npm ERR! npm -v 1.2.14
npm ERR! path C:projectsClient-ALivepackage.json
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:projectsClient-ALivenpm-debug.log
npm ERR! not ok code 0


and here is the npm-degub.log file



0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files (x86)\nodejs\\node.exe',
1 verbose cli 'C:\Program Files (x86)\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'install' ]
2 info using [email protected]
3 info using [email protected]
4 verbose node symlink C:Program Files (x86)nodejs\node.exe
5 verbose read json C:projectsClient-ALivepackage.json
6 error install Couldn't read dependencies
7 error Error: ENOENT, open 'C:projectsClient-ALivepackage.json'
8 error If you need help, you may report this log at:
8 error <http://github.com/isaacs/npm/issues>
8 error or email it to:
8 error <[email protected]>
9 error System Windows_NT 6.1.7601
10 error command C:\Program Files (x86)\nodejs\\node.exe C:\Program Files (x86)\nodejs\node_modules\npm\bin\npm-cli.js install
11 error cwd C:projectsClient-ALivescoreboard
12 error node -v v0.8.22
13 error npm -v 1.2.14
14 error path C:projectsClient-ALivepackage.json
15 error code ENOENT
16 error errno 34
17 verbose exit [ 34, true ]

More From » json

 Answers
16

Try to add this:



private: true,



it worked for me.



EDIT (for people asking why):



The Oficial documentation states the following:






If you set private: true in your package.json, then npm will refuse to publish it.
This is a way to prevent accidental publication of private repositories. If you would like to ensure that a given package is only ever published to a specific registry (for example, an internal registry), then use the publishConfig hash described below to override the registry config param at publish-time.






The error messages you are getting may be related to violating this rule in a way (mine was).




  • Either you are marking a unpublished package (like your own app) as
    private: false.

  • Or you are neglecting to include any value at all.


[#76183] Thursday, August 22, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
aidengiancarlop

Total Points: 234
Total Questions: 115
Total Answers: 94

Location: India
Member since Wed, Aug 26, 2020
4 Years ago
;