Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Error.captureStackTrace is not a function #211

Open
kderbalah opened this issue Dec 21, 2016 · 11 comments
Open

TypeError: Error.captureStackTrace is not a function #211

kderbalah opened this issue Dec 21, 2016 · 11 comments

Comments

@kderbalah
Copy link

I get this error after upgrading the Nodejs version from v6.9.2 to v7.0.1

TypeError: Error.captureStackTrace is not a function
    at ClientError.Error [as constructor] (/Users/kde/Workspace/icservice/node_modules/neo4j/lib-new/errors.coffee:9:15)
    at new ClientError (/Users/kde/Workspace/icservice/node_modules/neo4j/lib-new/errors.js:81:48)
    at Function.__dirname.Error.Error._fromObject (/Users/kde/Workspace/icservice/node_modules/neo4j/lib-new/errors.coffee:95:13)
    at /Users/kde/Workspace/icservice/node_modules/neo4j/lib-new/GraphDatabase.coffee:332:29
    at Request._callback (/Users/kde/Workspace/icservice/node_modules/neo4j/lib-new/GraphDatabase.coffee:100:24)
    at Request.self.callback (/Users/kde/Workspace/icservice/node_modules/request/request.js:186:22)
    at emitTwo (events.js:106:13)
    at Request.emit (events.js:191:7)
    at Request.<anonymous> (/Users/kde/Workspace/icservice/node_modules/request/request.js:1081:10)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:188:7)
    at IncomingMessage.<anonymous> (/Users/kde/Workspace/icservice/node_modules/request/request.js:1001:12)
    at IncomingMessage.g (events.js:292:16)
    at emitNone (events.js:91:20)
    at IncomingMessage.emit (events.js:185:7)
    at endReadableNT (_stream_readable.js:974:12)

It might be the V8 issue (bumped up version in Nodejs 7 to v8 5.4)

this.Error = (function(_super) {
    __extends(Error, _super);

    function Error(message, neo4j) {
      this.message = message != null ? message : 'Unknown error';
      this.neo4j = neo4j != null ? neo4j : {};
      this.name = 'neo4j.' + this.constructor.name;
      Error.captureStackTrace(this, this.constructor);
    }
...

I guess we should call the global one global.Error.captureStackTrace(this, this.constructor);

@TimothyMischief
Copy link

Same is still true for all versions of node above v7.0.1. I've tested on 7.3.1 and 8.0.0 nightlies and getting the same results. If it is a node issue it doesn't seem to have been addressed yet.

I was going to look at a PR but I don't know coffee well enough and solves to similar problems in other packages seem quite involved.

@pito-svk
Copy link

pito-svk commented Jan 23, 2017

any ideas about how to fix it? I would like to use nodejs version 7.4.0 for async await functionality with harmony. Thanks.

@ekkis
Copy link

ekkis commented Feb 19, 2017

I figured out a fix. see my post

@pito-svk
Copy link

pito-svk commented Feb 19, 2017

This is not a fix, but rather hack. I found that this repo isn't very maintained. Switched to officially supported https://github.com/neo4j/neo4j-javascript-driver

@ekkis
Copy link

ekkis commented Feb 20, 2017

it's on my TODO list, to upgrade to the new drivers. was your upgrade painful? I've been putting it off because everything's a rabbit hole

builtbywill added a commit to builtbywill/node-neo4j that referenced this issue Feb 20, 2017
builtbywill added a commit to builtbywill/node-neo4j that referenced this issue Feb 20, 2017
TyGuy pushed a commit to TyGuy/node-neo4j that referenced this issue Mar 6, 2017
@cagataycali
Copy link

Is there a any news?

@noeljackson
Copy link

I resorted to using https://github.com/neo4j/neo4j-javascript-driver for many reasons and it is working well.

@ekkis
Copy link

ekkis commented May 3, 2017

yeah. I did the upgrade as well. it was painful as expected but definitely worth the effort

@DiegoGallegos4
Copy link

DiegoGallegos4 commented May 9, 2017

Upgrading to supported driver is the solution, move away from this repo in the meanwhile.

@willynilly
Copy link

Yeah, I'm getting this error as well. Anyone know when it will be fixed?

@pito-svk
Copy link

@willynilly never I think :) just use official repo - https://github.com/neo4j/neo4j-javascript-driver

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants