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

4.7.0 depd error: #2262

Closed
nolanlawson opened this issue Jul 26, 2014 · 17 comments
Closed

4.7.0 depd error: #2262

nolanlawson opened this issue Jul 26, 2014 · 17 comments

Comments

@nolanlawson
Copy link

Seeing this error in express 4.7.0 (from pouchdb/pouchdb#2537). Downgrading to 4.6.1 solves the problem.

[0mGET /test_repl_remote/ [32m200 [0m0.840 ms - 59[0m

/home/travis/build/pouchdb/pouchdb/node_modules/pouchdb-server/node_modules/express/node_modules/depd/index.js:259
  var file = callSite.getFileName() || '<anonymous>'
                      ^
TypeError: Cannot call method 'getFileName' of undefined
    at callSiteLocation (/home/travis/build/pouchdb/pouchdb/node_modules/pouchdb-server/node_modules/express/node_modules/depd/index.js:259:23)
    at Function.log (/home/travis/build/pouchdb/pouchdb/node_modules/pouchdb-server/node_modules/express/node_modules/depd/index.js:201:12)
    at deprecate (/home/travis/build/pouchdb/pouchdb/node_modules/pouchdb-server/node_modules/express/node_modules/depd/index.js:124:9)
    at ServerResponse.send (/home/travis/build/pouchdb/pouchdb/node_modules/pouchdb-server/node_modules/express/lib/response.js:97:7)
    at ServerResponse.res.send (/home/travis/build/pouchdb/pouchdb/node_modules/pouchdb-server/node_modules/express-pouchdb/index.js:131:10)
    at /home/travis/build/pouchdb/pouchdb/node_modules/pouchdb-server/node_modules/express-pouchdb/index.js:576:25
    at /home/travis/build/pouchdb/pouchdb/lib/utils.js:396:11
    at process._tickCallback (node.js:415:13)

I'm guessing this was introduced in fd3b405?

@dougwilson
Copy link
Contributor

It's an error from the depd module. I'll get it fixed ASAP. Thanks for the report!

@dougwilson
Copy link
Contributor

@nolanlawson do you know how I can easily go about trying to reproduce this error? I tried to install express-puchdb, but it does not install it's dependencies on Windows.

@dougwilson
Copy link
Contributor

So far dougwilson/nodejs-depd#9 is the only reason I know would cause it, so I can only assume this is what caused the error for you.

@dougwilson
Copy link
Contributor

4.7.1 has been published and the entire module chain for express should no longer cause this exception.

@nolanlawson
Copy link
Author

@dougwilson I'm still seeing this erorr with depd@0.4.3 and express@4.7.1. (Travis log here.)

Sorry about the tests; they don't work on Windows because we rely on bash scripts, so you'll have to run them in a *nix environment. Should be as simple as git clone https://github.com/pouchdb/pouchdb-server.git && cd pouchdb-server && npm install && npm run test-pouchdb.

@nolanlawson
Copy link
Author

Although for now I've locked it to express@4.6.1 so you'll have to change the package.json too.

@dougwilson
Copy link
Contributor

they don't work on Windows because we rely on bash scripts, so you'll have to run them in a *nix environment

the bash scripts run just fine on Windows; it's the dependencies for it that I cannot get to install. They complain about needing python and some stuff.

@dougwilson
Copy link
Contributor

@nolanlawson I was able to reproduce it.

@dougwilson
Copy link
Contributor

So the error is because if v8 decides it had generated enough stack traces after a period of time, then it'll return empty stack traces for a little bit. Slowing down the tests or fixing some of the deprecations both result in the error not occurring, but it is something that still need to be fixed in depd. You can also set the environment variable NO_DEPRECATION=express to silence them all together (and they won't do the work that causes the throw).

@dougwilson
Copy link
Contributor

I filed this as dougwilson/nodejs-depd#10

@dougwilson
Copy link
Contributor

Alright, @nolanlawson , this time it should be good-to-go since I was able to run the fix with your test suite and it passed instead of throwing an error.

@nolanlawson
Copy link
Author

Wow, that was fast! Thanks for your quick work. :) I also noticed all the PRs, will be looking at those now.

@dougwilson
Copy link
Contributor

No problem :) I still haven't released express 7.6.2, but will soon. I remember hearing about pouchdb a while ago, and it's a pretty awesome project. All my PRs are just suggestions, so feel free to use or reject whatever you feel like :)

@dougwilson
Copy link
Contributor

Wow, that was fast! Thanks for your quick work. :)

It was made super easy once I was able to run something that caused it so I could inspect what was going on :)

@defunctzombie
Copy link
Contributor

Express 7.6.2 ?! How long have I been away?

@dougwilson
Copy link
Contributor

haha!, wow, idk what I'm thinking (: 4.7.2

dougwilson added a commit that referenced this issue Jul 27, 2014
@dougwilson
Copy link
Contributor

@nolanlawson express 4.7.2 has been published.

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

No branches or pull requests

3 participants