slashdotdash / node-ledger-web

Web front-end to access ledger cli data.
MIT License
144 stars 14 forks source link

Cannot read property 'prototype' of undefined #4

Closed arnuschky closed 8 years ago

arnuschky commented 9 years ago

Hitting the following error on first install:

$ NODE_ENV=production node app.js

util.js:556
  ctor.prototype = Object.create(superCtor.prototype, {
                                          ^
TypeError: Cannot read property 'prototype' of undefined
    at Object.exports.inherits (util.js:556:43)
    at Object.<anonymous> (/home/user/node-ledger-web.git/node_modules/http-proxy/lib/http-proxy/index.js:111:17)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/home/user/node-ledger-web.git/node_modules/http-proxy/lib/http-proxy.js:4:17)
    at Module._compile (module.js:456:26)

Packages:

├─┬ ejs-locals@1.0.2
│ └── ejs@0.8.8
├─┬ express@3.4.8
│ ├── buffer-crc32@0.2.1
│ ├─┬ commander@1.3.2
│ │ └── keypress@0.1.0
│ ├─┬ connect@2.12.0
│ │ ├── batch@0.5.0
│ │ ├── bytes@0.2.1
│ │ ├─┬ multiparty@2.2.0
│ │ │ ├─┬ readable-stream@1.1.13
│ │ │ │ ├── core-util-is@1.0.1
│ │ │ │ ├── inherits@2.0.1
│ │ │ │ ├── isarray@0.0.1
│ │ │ │ └── string_decoder@0.10.31
│ │ │ └── stream-counter@0.2.0
│ │ ├── negotiator@0.3.0
│ │ ├── pause@0.0.1
│ │ ├── qs@0.6.6
│ │ ├── raw-body@1.1.2
│ │ └── uid2@0.0.3
│ ├── cookie@0.1.0
│ ├── cookie-signature@1.0.1
│ ├── debug@0.8.1
│ ├── fresh@0.2.0
│ ├── merge-descriptors@0.0.1
│ ├── methods@0.1.0
│ ├── mkdirp@0.3.5
│ ├── range-parser@0.0.4
│ └─┬ send@0.1.4
│   └── mime@1.2.11
├─┬ grunt@0.4.5
│ ├── async@0.1.22
│ ├── coffee-script@1.3.3
│ ├── colors@0.6.2
│ ├── dateformat@1.0.2-1.2.3
│ ├── eventemitter2@0.4.14
│ ├── exit@0.1.2
│ ├─┬ findup-sync@0.1.3
│ │ ├─┬ glob@3.2.11
│ │ │ ├── inherits@2.0.1
│ │ │ └─┬ minimatch@0.3.0
│ │ │   ├── lru-cache@2.6.2
│ │ │   └── sigmund@1.0.0
│ │ └── lodash@2.4.2
│ ├── getobject@0.1.0
│ ├─┬ glob@3.1.21
│ │ ├── graceful-fs@1.2.3
│ │ └── inherits@1.0.0
│ ├─┬ grunt-legacy-log@0.1.1
│ │ ├── lodash@2.4.2
│ │ └── underscore.string@2.3.3
│ ├── grunt-legacy-util@0.2.0
│ ├── hooker@0.2.3
│ ├── iconv-lite@0.2.11
│ ├─┬ js-yaml@2.0.5
│ │ ├─┬ argparse@0.1.16
│ │ │ ├── underscore@1.7.0
│ │ │ └── underscore.string@2.4.0
│ │ └── esprima@1.0.4
│ ├── lodash@0.9.2
│ ├─┬ minimatch@0.2.14
│ │ ├── lru-cache@2.6.2
│ │ └── sigmund@1.0.0
│ ├─┬ nopt@1.0.10
│ │ └── abbrev@1.0.5
│ ├── rimraf@2.2.8
│ ├── underscore.string@2.2.1
│ └── which@1.0.9
├── grunt-contrib-copy@0.5.0
├─┬ grunt-contrib-jshint@0.8.0
│ └─┬ jshint@2.4.4
│   ├─┬ cli@0.4.5
│   │ └─┬ glob@5.0.5
│   │   ├─┬ inflight@1.0.4
│   │   │ └── wrappy@1.0.1
│   │   ├── inherits@2.0.1
│   │   ├─┬ minimatch@2.0.7
│   │   │ └─┬ brace-expansion@1.1.0
│   │   │   ├── balanced-match@0.2.0
│   │   │   └── concat-map@0.0.1
│   │   ├─┬ once@1.3.1
│   │   │ └── wrappy@1.0.1
│   │   └── path-is-absolute@1.0.0
│   ├── console-browserify@0.1.6
│   ├── exit@0.1.2
│   ├─┬ htmlparser2@3.3.0
│   │ ├── domelementtype@1.3.0
│   │ ├── domhandler@2.1.0
│   │ ├── domutils@1.1.6
│   │ └─┬ readable-stream@1.0.33
│   │   ├── core-util-is@1.0.1
│   │   ├── inherits@2.0.1
│   │   ├── isarray@0.0.1
│   │   └── string_decoder@0.10.31
│   ├─┬ minimatch@0.4.0
│   │ ├── lru-cache@2.6.2
│   │ └── sigmund@1.0.0
│   ├── shelljs@0.1.4
│   └── underscore@1.4.4
├─┬ grunt-contrib-requirejs@0.4.4
│ └── requirejs@2.1.17
├─┬ grunt-contrib-watch@0.5.3
│ ├─┬ gaze@0.4.3
│ │ └─┬ globule@0.1.0
│ │   ├─┬ glob@3.1.21
│ │   │ ├── graceful-fs@1.2.3
│ │   │ └── inherits@1.0.0
│ │   ├── lodash@1.0.2
│ │   └─┬ minimatch@0.2.14
│ │     ├── lru-cache@2.6.2
│ │     └── sigmund@1.0.0
│ └─┬ tiny-lr@0.0.4
│   ├── debug@0.7.4
│   ├── faye-websocket@0.4.4
│   ├─┬ noptify@0.0.3
│   │ └─┬ nopt@2.0.0
│   │   └── abbrev@1.0.5
│   └── qs@0.5.6
├─┬ grunt-react@0.6.0
│ ├─┬ react-tools@0.5.2
│ │ ├─┬ commoner@0.8.15
│ │ │ ├─┬ commander@2.8.1
│ │ │ │ └── graceful-readlink@1.0.1
│ │ │ ├─┬ glob@5.0.5
│ │ │ │ ├─┬ inflight@1.0.4
│ │ │ │ │ └── wrappy@1.0.1
│ │ │ │ ├── inherits@2.0.1
│ │ │ │ ├─┬ minimatch@2.0.7
│ │ │ │ │ └─┬ brace-expansion@1.1.0
│ │ │ │ │   ├── balanced-match@0.2.0
│ │ │ │ │   └── concat-map@0.0.1
│ │ │ │ ├─┬ once@1.3.1
│ │ │ │ │ └── wrappy@1.0.1
│ │ │ │ └── path-is-absolute@1.0.0
│ │ │ ├── graceful-fs@2.0.3
│ │ │ ├── install@0.1.8
│ │ │ ├─┬ mkdirp@0.5.0
│ │ │ │ └── minimist@0.0.8
│ │ │ ├── private@0.1.6
│ │ │ ├── q@1.3.0
│ │ │ ├─┬ recast@0.5.27
│ │ │ │ ├── ast-types@0.3.38
│ │ │ │ ├── cls@0.1.5
│ │ │ │ ├── esprima@1.1.0-dev-harmony (git+https://github.com/ariya/esprima.git#a41a40b49046747b3af57341cda048bbd3d9df79)
│ │ │ │ └─┬ source-map@0.1.32
│ │ │ │   └── amdefine@0.1.0
│ │ │ └─┬ whiskey@0.6.13
│ │ │   ├── async@0.9.0
│ │ │   ├── gex@0.0.1
│ │ │   ├── logmagic@0.1.4
│ │ │   ├── magic-templates@0.1.1
│ │ │   ├── rimraf@1.0.1
│ │ │   ├── simplesets@1.1.6
│ │ │   ├── sprintf@0.1.5
│ │ │   ├── terminal@0.1.3
│ │ │   └── underscore@1.8.3
│ │ ├── esprima-fb@1001.1001.2000-dev-harmony-fb
│ │ └─┬ jstransform@1.0.1
│ │   ├── base62@0.1.1
│ │   └─┬ source-map@0.1.8
│ │     └── amdefine@0.1.0
│ └── through@2.3.7
├─┬ grunt-recess@0.5.1
│ ├── async@0.2.10
│ ├─┬ chalk@0.4.0
│ │ ├── ansi-styles@1.0.0
│ │ ├── has-color@0.1.7
│ │ └── strip-ansi@0.1.1
│ ├─┬ grunt-lib-contrib@0.6.1
│ │ └── zlib-browserify@0.0.1
│ └─┬ recess@1.1.9
│   ├── colors@1.1.0
│   ├─┬ less@1.3.3
│   │ └── ycssmin@1.0.1
│   ├─┬ nopt@3.0.1
│   │ └── abbrev@1.0.5
│   ├── underscore@1.8.3
│   └─┬ watch@0.16.0
│     ├─┬ exec-sh@0.2.0
│     │ └── merge@1.2.0
│     └── minimist@1.1.1
├─┬ http-proxy@1.0.3
│ └── eventemitter3@1.0.1
├─┬ ledger-rest@0.1.0
│ ├─┬ JSONStream@0.8.4
│ │ ├── jsonparse@0.0.5
│ │ └── through@2.3.7
│ ├─┬ ledger-cli@0.1.1
│ │ └─┬ csv-streamify@0.9.1
│ │   └─┬ readable-stream@1.1.13
│ │     ├── core-util-is@1.0.1
│ │     ├── inherits@2.0.1
│ │     ├── isarray@0.0.1
│ │     └── string_decoder@0.10.31
│ └─┬ restify@2.6.3
│   ├── assert-plus@0.1.5
│   ├── backoff@2.3.0
│   ├─┬ bunyan@0.22.1
│   │ └── mv@0.0.5
│   ├── csv@0.3.7
│   ├── deep-equal@0.0.0
│   ├── dtrace-provider@0.2.8
│   ├── escape-regexp-component@1.0.2
│   ├── formidable@1.0.14
│   ├─┬ http-signature@0.10.0
│   │ ├── asn1@0.1.11
│   │ ├── assert-plus@0.1.2
│   │ └── ctype@0.5.2
│   ├── keep-alive-agent@0.0.1
│   ├── lru-cache@2.3.1
│   ├── mime@1.2.11
│   ├── negotiator@0.3.0
│   ├── node-uuid@1.4.1
│   ├── once@1.3.0
│   ├── qs@0.6.6
│   ├── semver@2.2.1
│   ├── spdy@1.19.3
│   ├── tunnel-agent@0.4.0
│   └─┬ verror@1.3.7
│     └── extsprintf@1.0.2
└── lodash@2.4.2
briviere commented 9 years ago

I'm having the same issue. I also tried

node app,js

and have the same issue.

thanks

Brian

briviere commented 9 years ago

I have it working by adding eventemitter3 and using the latest http-proxy.

{ "name": "ledger-web", "version": "0.0.1", "description": "Web front-end to access ledger cli data.", "repository": { "type": "git", "url": "git://github.com/slashdotdash/node-ledger-web.git" }, "keywords": [ "ledger", "accounting", "finance" ], "author": { "name": "Ben Smith", "email": "ben@10consulting.com" }, "license": "MIT", "main": "app.js", "directories": {}, "scripts": { "start": "node app" }, "devDependencies": { "grunt": "~0.4.2", "grunt-contrib-copy": "~0.5.0", "grunt-contrib-jshint": "~0.8.0", "grunt-contrib-requirejs": "~0.4.1", "grunt-contrib-watch": "~0.5.3", "grunt-react": "~0.6.0", "eventemitter3": "^0.1.6", "grunt-recess": "~0.5.0" }, "dependencies": { "express": "~3.4.8", "ejs-locals": "^1.0.2", "http-proxy": "^1.11.1", "ledger-rest": "^0.1.0", "lodash": "~2.4.1" } }

slashdotdash commented 8 years ago

Hopefully this is now fixed by PR #6.