Reputation: 303
I am using this piece of code taken from Kurento website:
git clone https://github.com/Kurento/kurento-tutorial-node.git
cd kurento-tutorial-node/kurento-hello-world
git checkout 6.1.0
npm install
npm start
After running the third line, npm install, I encounter this error:
npm WARN deprecated This version of npm lacks support for important features,
npm WARN deprecated such as scoped packages, offered by the primary npm
npm WARN deprecated registry. Consider upgrading to at least npm@2, if not the
npm WARN deprecated latest stable version. To upgrade to npm@2, run:
npm WARN deprecated
npm WARN deprecated npm -g install npm@latest-2
npm WARN deprecated
npm WARN deprecated To upgrade to the latest stable version, run:
npm WARN deprecated
npm WARN deprecated npm -g install npm@latest
npm WARN deprecated
npm WARN deprecated (Depending on how Node.js was installed on your system, you
npm WARN deprecated may need to prefix the preceding commands with `sudo`, or if
npm WARN deprecated on Windows, run them from an Administrator prompt.)
npm WARN deprecated
npm WARN deprecated If you're running the version of npm bundled with
npm WARN deprecated Node.js 0.10 LTS, be aware that the next version of 0.10 LTS
npm WARN deprecated will be bundled with a version of npm@2, which has some small
npm WARN deprecated backwards-incompatible changes made to `npm run-script` and
npm WARN deprecated semver behavior.
npm ERR! Error: EACCES, mkdir '/home/yashar/.npm/async/1.2.1'
npm ERR! { [Error: EACCES, mkdir '/home/yashar/.npm/async/1.2.1']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/home/yashar/.npm/async/1.2.1',
npm ERR! parent: 'kurento-client' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Linux 3.13.0-71-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! cwd /home/yashar/kurento-tutorial-node/kurento-hello-world
npm ERR! node -v v0.10.41
npm ERR! npm -v 1.4.29
npm ERR! path /home/yashar/.npm/async/1.2.1
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, mkdir '/home/yashar/.npm/async/1.2.1'
npm ERR! not ok code 0
What is the source of error and how could it be solved please?
Upvotes: 0
Views: 216
Reputation: 3541
You have installed/run npm as root, os the permissions in your ~/.npm
folder are wrong. You can run sudo chown -R $(whoami) ~/.npm
to fix that.
Upvotes: 1