TypeError on fresh install

46 views
Skip to first unread message

Richard Graves

unread,
May 13, 2015, 12:35:34 PM5/13/15
to node-...@googlegroups.com
Hi all, I am a newbie on this.

I have neo4j running and can access it at
http://localhost:7474/browser/

I commented out line 6,7 of users.js

var neo4j = require('neo4j');
var db = new neo4j.GraphDatabase(
//process.env['NEO4J_URL'] ||
//process.env['GRAPHENEDB_URL'] ||
'http://localhost:7474'
);


I am getting this error on a fresh install of the node-neo4j

TypeError: Cannot read property 'Symbol(formatted stack trace)' of undefined
    at Error.stack (/Users/rgg/Sites/node-neo4j-template/node_modules/neo4j/lib/GraphDatabase.js:2:8387)
    at Object.errorHandler [as handle] (/Users/rgg/Sites/node-neo4j-template/node_modules/express/node_modules/connect/lib/middleware/errorHandler.js:48:41)
    at next (/Users/rgg/Sites/node-neo4j-template/node_modules/express/node_modules/connect/lib/proto.js:185:17)
    at pass (/Users/rgg/Sites/node-neo4j-template/node_modules/express/lib/router/index.js:107:24)
    at nextRoute (/Users/rgg/Sites/node-neo4j-template/node_modules/express/lib/router/index.js:100:7)
    at callbacks (/Users/rgg/Sites/node-neo4j-template/node_modules/express/lib/router/index.js:164:11)
    at /Users/rgg/Sites/node-neo4j-template/routes/users.js:11:25
    at /Users/rgg/Sites/node-neo4j-template/models/user.js:143:25
    at __$GraphDatabase_prototype_query__20 (/Users/rgg/Sites/node-neo4j-template/node_modules/neo4j/lib/GraphDatabase.js:942:24)
    at /Users/rgg/Sites/node-neo4j-template/node_modules/neo4j/lib/GraphDatabase.js:2:6247

Any help would be greatly appreciated, thank you!

Aseem Kishore

unread,
May 13, 2015, 2:17:24 PM5/13/15
to Richard Graves, node-...@googlegroups.com
Very strange Richard.

What versions of Node, Neo4j, and node-neo4j are you running? (And what OS?)

Richard Graves

unread,
May 13, 2015, 2:43:31 PM5/13/15
to node-...@googlegroups.com, viv...@gmail.com
Hi and thank you for reply!

I am running
neo4j 2.2
node-neo4j 2 - https://github.com/aseemk/node-neo4j-template
node 0.12.2
OSX 10.10.3

I also tried turning off auth in neo4j-server.properties same error

and then turned back on and tried:

var db = new neo4j.GraphDatabase(
//process.env['NEO4J_URL'] ||
//process.env['GRAPHENEDB_URL'] ||
    'username:pw@localhost:7474'
);

and get same error

Richard Graves

unread,
May 13, 2015, 2:50:51 PM5/13/15
to node-...@googlegroups.com
I should also clarify that I do not get an error when I go to localhost:3000 where I see this:

***

Node-Neo4j Template

This is a template app showing the use of Neo4j from Node.js. It uses the node-neo4j library, available on npm as neo4j.

This app is a simple social network manager: it lets you add and remove users and "follows" relationships between them.

Get started: View all users

***

I get the error when I click on "View all users" to the URL http://localhost:3000/users

Aseem Kishore

unread,
May 13, 2015, 2:51:49 PM5/13/15
to Richard Graves, node-...@googlegroups.com
Thanks Richard, that's helpful.

node-neo4j-template currently still points to node-neo4j v1:


So is it possible that you have node-neo4j v2 installed?

What output do you get when you run `npm ls`?

Richard Graves

unread,
May 13, 2015, 3:19:04 PM5/13/15
to node-...@googlegroups.com, viv...@gmail.com
I think I do have node-neo4j v2 installed. Did I paste the wrong link?

npm ls:

NodeNeo4...@0.0.1 /Users/rgg/Sites/node-neo4j-template
├─┬ ch...@1.8.1
│ ├── asserti...@1.0.0
│ └─┬ deep...@0.1.3
│   └── type-...@0.1.1
├─┬ exp...@3.2.6
│ ├── buffer...@0.2.1
│ ├── comm...@0.6.1
│ ├─┬ con...@2.7.11
│ │ ├── by...@0.2.0
│ │ ├── coo...@0.0.5
│ │ ├── formi...@1.0.14
│ │ ├── pa...@0.0.1
│ │ ├── q...@0.6.5
│ │ └─┬ se...@0.1.1
│ │   └── mi...@1.2.11
│ ├── coo...@0.1.0
│ ├── cookie-s...@1.0.1
│ ├─┬ de...@2.2.0
│ │ └── m...@0.7.1
│ ├── fr...@0.1.0
│ ├── met...@0.0.1
│ ├── mkd...@0.3.4
│ ├── range-...@0.0.4
│ └─┬ se...@0.1.0
│   └── mi...@1.2.6
├─┬ gr...@0.4.5
│ ├── as...@0.1.22
│ ├── coffee...@1.3.3
│ ├── col...@0.6.2
│ ├── datef...@1.0.2-1.2.3
│ ├── evente...@0.4.14
│ ├── ex...@0.1.2
│ ├─┬ findu...@0.1.3
│ │ ├─┬ gl...@3.2.11
│ │ │ ├── inhe...@2.0.1
│ │ │ └─┬ mini...@0.3.0
│ │ │   ├── lru-...@2.6.2
│ │ │   └── sig...@1.0.0
│ │ └── lod...@2.4.2
│ ├── geto...@0.1.0
│ ├─┬ gl...@3.1.21
│ │ ├── grace...@1.2.3
│ │ └── inhe...@1.0.0
│ ├─┬ grunt-le...@0.1.1
│ │ ├── lod...@2.4.2
│ │ └── undersco...@2.3.3
│ ├── grunt-le...@0.2.0
│ ├── hoo...@0.2.3
│ ├── iconv...@0.2.11
│ ├─┬ js-...@2.0.5
│ │ ├─┬ argp...@0.1.16
│ │ │ ├── under...@1.7.0
│ │ │ └── undersco...@2.4.0
│ │ └── esp...@1.0.4
│ ├── lod...@0.9.2
│ ├─┬ mini...@0.2.14
│ │ ├── lru-...@2.6.2
│ │ └── sig...@1.0.0
│ ├─┬ no...@1.0.10
│ │ └── abb...@1.0.5
│ ├── rim...@2.2.8
│ ├── undersco...@2.2.1
│ └── wh...@1.0.9
├─┬ grunt-bow...@1.6.0
│ ├─┬ bower-...@0.5.2
│ │ ├── grace...@2.0.3
│ │ ├── mo...@0.9.1
│ │ ├─┬ opti...@0.6.1
│ │ │ ├── mini...@0.0.10
│ │ │ └── word...@0.0.3
│ │ └── os...@0.0.3
│ └─┬ wir...@1.5.0
│   ├─┬ ch...@0.1.1
│   │ ├── ansi-...@0.1.2
│   │ └── has-...@0.1.7
│   ├─┬ gl...@3.2.11
│   │ ├── inhe...@2.0.1
│   │ └─┬ mini...@0.3.0
│   │   ├── lru-...@2.6.2
│   │   └── sig...@1.0.0
│   ├── lod...@1.3.1
│   └─┬ thro...@0.4.2
│     ├─┬ readabl...@1.0.33
│     │ ├── core-u...@1.0.1
│     │ ├── inhe...@2.0.1
│     │ ├── isa...@0.0.1
│     │ └── string_...@0.10.31
│     └─┬ xt...@2.1.2
│       └── objec...@0.4.0
├─┬ ja...@0.26.3
│ ├── comm...@0.6.1
│ └── mkd...@0.3.0
├─┬ mo...@1.18.2
│ ├── comm...@2.0.0
│ ├─┬ de...@2.2.0
│ │ └── m...@0.7.1
│ ├── di...@1.0.7
│ ├─┬ gl...@3.2.3
│ │ ├── grace...@2.0.3
│ │ ├── inhe...@2.0.1
│ │ └─┬ mini...@0.2.14
│ │   ├── lru-...@2.6.2
│ │   └── sig...@1.0.0
│ ├── gr...@1.7.0
│ └── mkd...@0.3.5
├─┬ ne...@1.1.1
│ ├── http-...@0.1.8
│ └─┬ req...@2.55.0
│   ├── aws-...@0.5.0
│   ├─┬ b...@0.9.4
│   │ └─┬ readabl...@1.0.33
│   │   ├── core-u...@1.0.1
│   │   ├── inhe...@2.0.1
│   │   ├── isa...@0.0.1
│   │   └── string_...@0.10.31
│   ├── case...@0.9.0
│   ├─┬ combine...@0.0.7
│   │ └── delayed...@0.0.5
│   ├── foreve...@0.6.1
│   ├─┬ form...@0.2.0
│   │ └── as...@0.9.0
│   ├─┬ har-va...@1.7.0
│   │ ├── blue...@2.9.25
│   │ ├─┬ ch...@1.0.0
│   │ │ ├── ansi-...@2.0.1
│   │ │ ├── escape-str...@1.0.3
│   │ │ ├─┬ has-...@1.0.3
│   │ │ │ ├── ansi-...@1.1.1
│   │ │ │ └── get-...@4.0.1
│   │ │ ├─┬ strip...@2.0.1
│   │ │ │ └── ansi-...@1.1.1
│   │ │ └── support...@1.3.1
│   │ ├─┬ comm...@2.8.1
│   │ │ └── graceful...@1.0.1
│   │ └─┬ is-my-js...@2.11.0
│   │   ├── generate...@2.0.0
│   │   ├─┬ generate-obj...@1.1.1
│   │   │ └── is-pr...@1.0.2
│   │   ├── jsonp...@1.1.0
│   │   └── xt...@4.0.0
│   ├─┬ ha...@2.3.1
│   │ ├── bo...@2.7.1
│   │ ├── cryp...@2.0.4
│   │ ├── ho...@2.13.0
│   │ └── sn...@1.0.9
│   ├─┬ http-si...@0.10.1
│   │ ├── as...@0.1.11
│   │ ├── asser...@0.1.5
│   │ └── ct...@0.5.3
│   ├── isst...@0.1.2
│   ├── json-stri...@5.0.0
│   ├─┬ mime-...@2.0.11
│   │ └── mim...@1.9.1
│   ├── node...@1.4.3
│   ├── oauth...@0.6.0
│   ├── q...@2.4.2
│   ├── string...@0.0.4
│   ├── tough-...@1.1.0
│   └── tunnel...@0.4.0
└─┬ node...@2.0.2
  ├── chok...@0.6.3
  ├─┬ datef...@1.0.11
  │ ├── get-...@4.0.1
  │ └─┬ me...@3.1.0
  │   ├─┬ camelca...@1.0.0
  │   │ ├── came...@1.0.2
  │   │ └── map...@1.0.1
  │   ├─┬ indent...@1.2.1
  │   │ └─┬ repe...@1.1.2
  │   │   └── is-f...@1.0.0
  │   ├── mini...@1.1.1
  │   └── object...@2.0.0
  └── gr...@1.7.0



On Wednesday, May 13, 2015 at 11:51:49 AM UTC-7, Aseem Kishore wrote:
Thanks Richard, that's helpful.

node-neo4j-template currently still points to node-neo4j v1:


So is it possible that you have node-neo4j v2 installed?

What output do you get when you run `npm ls`?

Aseem Kishore

unread,
May 13, 2015, 3:21:51 PM5/13/15
to Richard Graves, node-...@googlegroups.com
Hmm, your `npm ls` output shows node-neo4j v1:

> ├─┬ ne...@1.1.1

(Which, if you're using node-neo4j-template's users.js as a starting point, should work. Have you modified users.js other than commenting out those two lines?)

Given the `npm ls` output, what do you mean by "I think I do have node-neo4j v2 installed"?

Aseem

Matthew Hodges

unread,
May 22, 2015, 7:44:36 AM5/22/15
to Richard Graves, Node-Neo4j Discussion
I got this error yesterday when I set up a machine with Neo4J v2.2 and ran node-neo4j v1.1 against it.  Node-neo4j was calling neo4j without credentials and getting the 401 error back.  (Incidentally, npm installed the node-neo4j v1.1 because I still had the version number set in my package.json file.)

Thanks,
Matt Hodges

Aseem Kishore

unread,
May 22, 2015, 9:26:28 AM5/22/15
to Matthew Hodges, Richard Graves, Node-Neo4j Discussion
Thanks Matt. Did things work when you added the auth credentials to the URL? (E.g. 'http://neo4j:neo4j@localhost:7474')

Matthew Hodges

unread,
May 23, 2015, 12:35:17 PM5/23/15
to Aseem Kishore, Richard Graves, Node-Neo4j Discussion
Hi Aseem,
Yes, I got the node-neo4j v2 installed and talking to neo4j so that's all good.  I was thinking of making some upgrade notes as I go through my applications.  I've been switching everything over to the new node-neo4j v2 structures, cleaning out all the old  "_node._data.data" references to the simplified "properties", and  "_id".  

Actually, a question on that:  short term, I'm still using the private _id property from node-neo4j until I settle on a UUID solution as I migrate away from internal neo4j ids, as strongly recommended.  It looks like an unmanaged extension to neo4j may the best option at this point.  I've been looking at the GraphAware solution, vs. building my own using JAX-RS.  Have you had any experience with this problem?

Thanks,

Matt
Reply all
Reply to author
Forward
0 new messages