nodejitsu/jitsu — Issue #162: [flatiron] ncp missing from common namespace
Author: jesusabdullah
Created: 2012-02-16 21:02:07+00:00
State: open

In `lib/jitsu/commands/install.js`, line 82 calls `ncp.ncp` and ncp` is defined as `common.ncp` on line 11. However, `common.ncp` is undefined.

I figure you could add this either by requiring utile or ncp. I'm not sure which approach is preferred.

```

% jitsu install http-server
info: Welcome to Nodejitsu
info: It worked if it ends with Nodejitsu ok
info: Executing command install http-server
warn: /tmp/http-server is not empty.
warn: Creating a node app in this directory may overwrite existing files.
prompt: Proceed anyway? (no): yes
info: Installing http-server locally.
warn: Downloading packages from npm, this may take a moment...
{
"process": {
"pid": 22144,
"uid": 1000,
"gid": 1000,
"cwd": "/tmp/http-server",
"execPath": "/usr/local/bin/node",
"version": "v0.6.10",
"argv": [
"node",
"/usr/local/bin/jitsu",
"install",
"http-server"
],
"memoryUsage": {
"rss": 70070272,
"heapTotal": 50708992,
"heapUsed": 14308032
}
},
"os": {
"loadavg": [
0.05322265625,
0.11474609375,
0.130859375
],
"uptime": 495059.848770696
},
"trace": [
{
"column": 11,
"file": "/home/josh/dev/nodejitsu/jitsu/lib/jitsu/commands/install.js",
"function": null,
"line": 82,
"method": null,
"native": false
},
{
"column": 12,
"file": "/home/josh/dev/nodejitsu/jitsu/node_modules/npm/lib/install.js",
"function": "save",
"line": 148,
"method": null,
"native": false
},
{
"column": 7,
"file": "/home/josh/dev/nodejitsu/jitsu/node_modules/npm/lib/install.js",
"function": "afterWrite",
"line": 85,
"method": null,
"native": false
},
{
"column": 3,
"file": "/home/josh/dev/nodejitsu/jitsu/lib/jitsu/package.js",
"function": "Object.write",
"line": 33,
"method": "write",
"native": false
},
{
"column": 24,
"file": "/home/josh/dev/nodejitsu/jitsu/node_modules/npm/lib/install.js",
"function": "cb",
"line": 80,
"method": null,
"native": false
},
{
"column": 32,
"file": "/home/josh/dev/nodejitsu/jitsu/node_modules/npm/lib/install.js",
"function": "cb",
"line": 261,
"method": null,
"native": false
},
{
"column": 11,
"file": "/home/josh/dev/nodejitsu/jitsu/node_modules/npm/node_modules/slide/lib/async-map.js",
"function": "cb",
"line": 48,
"method": null,
"native": false
},
{
"column": 9,
"file": "/home/josh/dev/nodejitsu/jitsu/node_modules/npm/lib/install.js",
"function": null,
"line": 483,
"method": null,
"native": false
},
{
"column": 26,
"file": "/home/josh/dev/nodejitsu/jitsu/node_modules/npm/node_modules/slide/lib/chain.js",
"function": "LOOP",
"line": 7,
"method": null,
"native": false
},
{
"column": 7,
"file": "/home/josh/dev/nodejitsu/jitsu/node_modules/npm/node_modules/slide/lib/chain.js",
"function": null,
"line": 18,
"method": null,
"native": false
}
],
"stack": [
"TypeError: Cannot call method 'ncp' of undefined",
" at /home/josh/dev/nodejitsu/jitsu/lib/jitsu/commands/install.js:82:11",
" at save (/home/josh/dev/nodejitsu/jitsu/node_modules/npm/lib/install.js:148:12)",
" at afterWrite (/home/josh/dev/nodejitsu/jitsu/node_modules/npm/lib/install.js:85:7)",
" at Object.write (/home/josh/dev/nodejitsu/jitsu/lib/jitsu/package.js:33:3)",
" at cb (/home/josh/dev/nodejitsu/jitsu/node_modules/npm/lib/install.js:80:24)",
" at cb (/home/josh/dev/nodejitsu/jitsu/node_modules/npm/lib/install.js:261:32)",
" at cb (/home/josh/dev/nodejitsu/jitsu/node_modules/npm/node_modules/slide/lib/async-map.js:48:11)",
" at /home/josh/dev/nodejitsu/jitsu/node_modules/npm/lib/install.js:483:9",
" at LOOP (/home/josh/dev/nodejitsu/jitsu/node_modules/npm/node_modules/slide/lib/chain.js:7:26)",
" at /home/josh/dev/nodejitsu/jitsu/node_modules/npm/node_modules/slide/lib/chain.js:18:7"
],
"level": "error",
"message": "uncaughtException"
}
```