Skip to content

Instantly share code, notes, and snippets.

@zdzolton
Created August 13, 2010 02:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zdzolton/522145 to your computer and use it in GitHub Desktop.
Save zdzolton/522145 to your computer and use it in GitHub Desktop.
Installing a Node.js package via NPM
$ npm install request
npm it worked if it ends with ok
npm cli [ 'install', 'request' ]
npm version 0.1.23
npm config file /Users/zach/.npmrc
npm config file /usr/local/Cellar/node/0.1.103/etc/npmrc
npm install pkg request
npm fetch data request
npm GET request
npm install pkg request
npm install pkg request@0.10.0
npm GET request/0.10.0
npm fetch http://registry.npmjs.org/request/-/request-0.10.0.tgz
npm fetch /usr/local/lib/node/.npm/.cache/request/0.10.0/package.tgz
npm content-length 3856
npm downloaded 30%
npm downloaded 68%
npm downloaded 100%
npm fetch finished
npm bytes 3856
npm exec tar "xzf" "/usr/local/lib/node/.npm/.cache/request/0.10.0/package.tgz" "--strip-components=1" "-C" "/usr/local/lib/node/.npm/.cache/request/0.10.0/package"
npm buildAll About to unpack
npm unpack [ 'request', '0.10.0' ]
npm exec tar "xzf" "/usr/local/lib/node/.npm/.cache/request/0.10.0/package.tgz" "--strip-components=1" "-C" "/usr/local/lib/node/.npm/request/0.10.0/package"
npm createMain ./lib/main
npm linkLib request-0.10.0
npm ! WARNING !
npm ! WARNING ! Symlinking the lib directory is deprecated
npm ! WARNING ! Please don't rely on this feature, as it will be removed.
npm ! WARNING ! Use the 'main' module instead.
npm ! WARNING !
npm update-dependents only version, no dependencies to update
npm activate request@0.10.0
npm build Success: request@0.10.0
npm ok
$ npm ls request
npm it worked if it ends with ok
npm cli [ 'ls', 'request' ]
npm version 0.1.23
npm config file /Users/zach/.npmrc
npm config file /usr/local/Cellar/node/0.1.103/etc/npmrc
npm GET /
request@0.8.3 =mikeal remote
request@0.9.0 =mikeal remote
request@0.9.1 =mikeal remote
request@0.9.5 =mikeal remote stable
request@0.10.0 =mikeal installed latest remote
npm ok
node> var request = require('request');
Error: Cannot find module 'request'
at loadModule (module:243:13)
at require (module:374:12)
at cwdRequire (repl:26:10)
at [object Context]:1:15
at Interface.<anonymous> (repl:75:19)
at Interface.emit (events:26:26)
at Interface._ttyWrite (readline:178:12)
at Interface.write (readline:119:27)
at Stream.<anonymous> (repl:56:9)
at Stream.emit (events:26:26)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment