J'essaie d'installer grunt.js. Comme le dit official docs, je courraiserreur lors de l'installation gruntjs (package node.js/npm)
npm install -g grunt-cli
en tant que root (j'utilise linux ubuntu). Je suis en train - et je reçois l'erreur suivante:
$ sudo npm install -g grunt-cli
npm ERR! sudon't!
npm ERR! sudon't! Running npm as root is not recommended!
npm ERR! sudon't! Seriously, don't do this!
npm ERR! sudon't!
npm ERR! couldn't read package.json in .
npm ERR! Error installing .
npm ERR! Error: ENOENT, No such file or directory 'package.json'
npm ERR! Report this *entire* log at <http://github.com/isaacs/npm/issues>
npm ERR! or email it to <[email protected]>
npm ERR! Just tweeting a tiny part of the error will not be helpful.
npm not ok
Quelqu'un peut-il expliquer s'il vous plaît:
[1] why npm says `sudon't` and grunt docs says `do sudo`? And what is it all about?
[2] I want to install the grunt as a tool. Why does the message complains about missing package.json which is project-dependent (and I don't want to run grunt on any project, I want to install it globally first)?
[3] what can I do to make it install successfully?
Quelle version de noeud utilisez-vous? On dirait que cela a été résolu il y a longtemps: http://stackoverflow.com/questions/4938592/how-why-does-npm-recommend-not-running-as-root – jgillich
0.4.9 à partir de paquets oneiric ocelot. Eh bien, je ne comprends pas très bien de quoi il s'agit, mais je veux juste installer 'grunt.js' ... – ducin