Closed YonasBerhe closed 8 years ago
@YonasBerhe see line 74:
74 error Please try running this command again as root/Administrator.
use sudo to solve it:
sudo npm install -g learnyounode
Hey @YonasBerhe I know it's been a while, but if you're still having trouble I would suggest opening a ticket on the learnyounode
repo: https://github.com/workshopper/learnyounode
System.log debug file 0 info it worked if it ends with ok 1 verbose cli [ 'node', '/usr/bin/npm', 'install', 'learnyounode', '-g' ] 2 info using npm@2.1.16 3 info using node@v0.10.33 4 verbose node symlink /usr/bin/node 5 silly cache add args [ 'learnyounode', null ] 6 verbose cache add spec learnyounode 7 silly cache add parsed spec { raw: 'learnyounode', 7 silly cache add scope: null, 7 silly cache add name: 'learnyounode', 7 silly cache add rawSpec: '', 7 silly cache add spec: '', 7 silly cache add type: 'range' } 8 verbose addNamed learnyounode@ 9 silly addNamed semver.valid null 10 silly addNamed semver.validRange 11 silly addNameRange { name: 'learnyounode', range: '', hasData: false } 12 silly mapToRegistry name learnyounode 13 silly mapToRegistry using default registry 14 silly mapToRegistry registry https://registry.npmjs.org/ 15 silly mapToRegistry uri https://registry.npmjs.org/learnyounode 16 verbose addNameRange registry:https://registry.npmjs.org/learnyounode not in flight; fetching 17 verbose request uri https://registry.npmjs.org/learnyounode 18 verbose request no auth needed 19 info attempt registry request try #1 at 04:16:17 20 verbose request id 2277823b8d017a85 21 http request GET https://registry.npmjs.org/learnyounode 22 http 200 https://registry.npmjs.org/learnyounode 23 silly get cb [ 200, 23 silly get { date: 'Mon, 05 Jan 2015 12:16:18 GMT', 23 silly get server: 'CouchDB/1.5.0 (Erlang OTP/R16B03)', 23 silly get etag: '"DYQOKPXSB3NA610ZBIFHCPWGO"', 23 silly get 'content-type': 'application/json', 23 silly get 'cache-control': 'max-age=60', 23 silly get 'content-length': '67738', 23 silly get 'accept-ranges': 'bytes', 23 silly get via: '1.1 varnish', 23 silly get age: '0', 23 silly get 'x-served-by': 'cache-sjc3127-SJC', 23 silly get 'x-cache': 'MISS', 23 silly get 'x-cache-hits': '0', 23 silly get 'x-timer': 'S1420460178.028819,VS0,VE246', 23 silly get vary: 'Accept', 23 silly get 'keep-alive': 'timeout=10, max=50', 23 silly get connection: 'Keep-Alive' } ] 24 silly addNameRange number 2 { name: 'learnyounode', range: '', hasData: true } 25 silly addNameRange versions [ 'learnyounode', 25 silly addNameRange [ '0.0.0', 25 silly addNameRange '0.0.1', 25 silly addNameRange '0.0.2', 25 silly addNameRange '0.0.3', 25 silly addNameRange '0.0.4', 25 silly addNameRange '0.0.5', 25 silly addNameRange '0.0.6', 25 silly addNameRange '0.0.7', 25 silly addNameRange '0.0.8', 25 silly addNameRange '0.0.9', 25 silly addNameRange '0.1.0', 25 silly addNameRange '0.1.1', 25 silly addNameRange '0.2.0', 25 silly addNameRange '0.2.1', 25 silly addNameRange '0.2.2', 25 silly addNameRange '0.2.3', 25 silly addNameRange '0.2.4', 25 silly addNameRange '0.2.5', 25 silly addNameRange '0.2.6', 25 silly addNameRange '0.2.7', 25 silly addNameRange '0.2.8', 25 silly addNameRange '0.2.9', 25 silly addNameRange '0.2.10', 25 silly addNameRange '0.2.11', 25 silly addNameRange '0.2.12', 25 silly addNameRange '0.2.13', 25 silly addNameRange '0.2.14', 25 silly addNameRange '0.2.15', 25 silly addNameRange '0.2.16', 25 silly addNameRange '0.2.16-mimbug', 25 silly addNameRange '0.3.0', 25 silly addNameRange '0.3.1', 25 silly addNameRange '0.3.2', 25 silly addNameRange '0.3.3', 25 silly addNameRange '0.4.0', 25 silly addNameRange '0.4.1', 25 silly addNameRange '1.0.0-alpha01', 25 silly addNameRange '1.0.0', 25 silly addNameRange '1.0.1', 25 silly addNameRange '1.0.2', 25 silly addNameRange '1.0.3', 25 silly addNameRange '1.0.4', 25 silly addNameRange '1.0.5', 25 silly addNameRange '1.0.6', 25 silly addNameRange '1.0.7' ] ] 26 verbose addNamed learnyounode@1.0.7 27 silly addNamed semver.valid 1.0.7 28 silly addNamed semver.validRange 1.0.7 29 silly mapToRegistry name learnyounode 30 silly mapToRegistry using default registry 31 silly mapToRegistry registry https://registry.npmjs.org/ 32 silly mapToRegistry uri https://registry.npmjs.org/learnyounode 33 verbose addRemoteTarball https://registry.npmjs.org/learnyounode/-/learnyounode-1.0.7.tgz not in flight; adding 34 verbose addRemoteTarball [ 'https://registry.npmjs.org/learnyounode/-/learnyounode-1.0.7.tgz', 34 verbose addRemoteTarball 'bea0a40c7e59823f543f5ed2a9bb1c4d6df6eb09' ] 35 info retry fetch attempt 1 at 04:16:18 36 info attempt registry request try #1 at 04:16:18 37 http fetch GET https://registry.npmjs.org/learnyounode/-/learnyounode-1.0.7.tgz 38 http fetch 200 https://registry.npmjs.org/learnyounode/-/learnyounode-1.0.7.tgz 39 silly fetchAndShaCheck shasum bea0a40c7e59823f543f5ed2a9bb1c4d6df6eb09 40 verbose addTmpTarball /tmp/npm-4975-da0d0bea/registry.npmjs.org/learnyounode/-/learnyounode-1.0.7.tgz not in flight; adding 41 verbose addTmpTarball already have metadata; skipping unpack for learnyounode@1.0.7 42 silly cache afterAdd learnyounode@1.0.7 43 verbose afterAdd /home/yonas/.npm/learnyounode/1.0.7/package/package.json not in flight; writing 44 verbose afterAdd /home/yonas/.npm/learnyounode/1.0.7/package/package.json written 45 silly install resolved [ { name: 'learnyounode', 45 silly install resolved version: '1.0.7', 45 silly install resolved description: 'Learn You The Node.js For Much Win! An intro to Node.js via a set of self-guided workshops.', 45 silly install resolved author: 45 silly install resolved { name: 'Rod Vagg', 45 silly install resolved email: 'rod@vagg.org', 45 silly install resolved url: 'https://github.com/rvagg' }, 45 silly install resolved contributors: [ [Object], [Object], [Object], [Object], [Object], [Object] ], 45 silly install resolved repository: 45 silly install resolved { type: 'git', 45 silly install resolved url: 'https://github.com/rvagg/learnyounode.git' }, 45 silly install resolved license: 'MIT', 45 silly install resolved dependencies: 45 silly install resolved { workshopper: '^1.0.0-alpha05', 45 silly install resolved 'workshopper-exercise': '^0.2.2', 45 silly install resolved 'workshopper-wrappedexec': '^0.1.1', 45 silly install resolved 'workshopper-boilerplate': '0.0.1', 45 silly install resolved 'concat-stream': '^1.4.1', 45 silly install resolved duplexer: '^0.1.1', 45 silly install resolved through: '^2.3.4', 45 silly install resolved boganipsum: '^0.1.0', 45 silly install resolved hyperquest: '^0.2.0', 45 silly install resolved bl: '^0.7.0', 45 silly install resolved 'through2-map': '^1.2.1', 45 silly install resolved 'colors-tmpl': '^0.1.0', 45 silly install resolved after: '^0.8.1', 45 silly install resolved rimraf: '^2.2.6', 45 silly install resolved chalk: '^0.4.0', 45 silly install resolved through2: '^0.4.1' }, 45 silly install resolved bin: { learnyounode: './learnyounode.js' }, 45 silly install resolved preferGlobal: true, 45 silly install resolved gitHead: '46361c1b7007d470923e1685b12afbaa574b8cc3', 45 silly install resolved bugs: { url: 'https://github.com/rvagg/learnyounode/issues' }, 45 silly install resolved homepage: 'https://github.com/rvagg/learnyounode', 45 silly install resolved _id: 'learnyounode@1.0.7', 45 silly install resolved scripts: {}, 45 silly install resolved _shasum: 'bea0a40c7e59823f543f5ed2a9bb1c4d6df6eb09', 45 silly install resolved _from: 'learnyounode@', 45 silly install resolved _npmVersion: '2.1.11', 45 silly install resolved _nodeVersion: '0.10.33', 45 silly install resolved _npmUser: { name: 'rvagg', email: 'rod@vagg.org' }, 45 silly install resolved maintainers: [ [Object] ], 45 silly install resolved dist: 45 silly install resolved { shasum: 'bea0a40c7e59823f543f5ed2a9bb1c4d6df6eb09', 45 silly install resolved tarball: 'http://registry.npmjs.org/learnyounode/-/learnyounode-1.0.7.tgz' }, 45 silly install resolved directories: {}, 45 silly install resolved _resolved: 'https://registry.npmjs.org/learnyounode/-/learnyounode-1.0.7.tgz' } ] 46 info install learnyounode@1.0.7 into /usr/local/lib 47 info installOne learnyounode@1.0.7 48 verbose installOne of learnyounode to /usr/local/lib not in flight; installing 49 verbose lock using /home/yonas/.npm/_locks/learnyounode-3267a39f0ae1a4f5.lock for /usr/local/lib/node_modules/learnyounode 50 silly install write writing learnyounode 1.0.7 to /usr/local/lib/node_modules/learnyounode 51 silly cache addNamed cb learnyounode@1.0.7 52 verbose unbuild lib/node_modules/learnyounode 53 verbose gentlyRm vacuuming /usr/local/lib/node_modules/learnyounode 54 verbose tar unpack /home/yonas/.npm/learnyounode/1.0.7/package.tgz 55 verbose tar unpacking to /usr/local/lib/node_modules/learnyounode 56 verbose gentlyRm vacuuming /usr/local/lib/node_modules/learnyounode 57 silly gunzTarPerm modes [ '775', '664' ] 58 error tar.unpack untar error /home/yonas/.npm/learnyounode/1.0.7/package.tgz 59 verbose unlock done using /home/yonas/.npm/_locks/learnyounode-3267a39f0ae1a4f5.lock for /usr/local/lib/node_modules/learnyounode 60 verbose fstream_path /usr/local/lib/node_modules/learnyounode 61 verbose fstream_type Directory 62 verbose fstream_class DirWriter 63 verbose stack Error: EACCES, mkdir '/usr/local/lib/node_modules' 64 verbose fstream_stack /usr/lib/node_modules/npm/node_modules/fstream/lib/writer.js:171:23 64 verbose fstream_stack /usr/lib/node_modules/npm/node_modules/mkdirp/index.js:46:53 64 verbose fstream_stack Object.oncomplete (fs.js:107:15) 65 verbose cwd /home/yonas 66 error Linux 3.13.0-43-generic 67 error argv "node" "/usr/bin/npm" "install" "learnyounode" "-g" 68 error node v0.10.33 69 error npm v2.1.16 70 error path /usr/local/lib/node_modules 71 error code EACCES 72 error errno 3 73 error Error: EACCES, mkdir '/usr/local/lib/node_modules' 73 error { [Error: EACCES, mkdir '/usr/local/lib/node_modules'] 73 error errno: 3, 73 error code: 'EACCES', 73 error path: '/usr/local/lib/node_modules', 73 error fstream_type: 'Directory', 73 error fstream_path: '/usr/local/lib/node_modules/learnyounode', 73 error fstream_class: 'DirWriter', 73 error fstream_stack: 73 error [ '/usr/lib/node_modules/npm/node_modules/fstream/lib/writer.js:171:23', 73 error '/usr/lib/node_modules/npm/node_modules/mkdirp/index.js:46:53', 73 error 'Object.oncomplete (fs.js:107:15)' ] } 74 error Please try running this command again as root/Administrator. 75 verbose exit [ 3, true ] 76 verbose unbuild lib/node_modules/learnyounode 77 verbose gentlyRm vacuuming /usr/local/lib/node_modules/learnyounode