TypeError: callSite.getFileName is not a function node upgrade issue

(Ashish Naikwadi) #1

Getting TypeError: callSite.getFileName is not a function error after upgrading node version from 6.14.3 to 8.15.1.
same issue is gettting for 10.x.x node version
express\node_modules\depd\index.js:111:14)
express\node_modules\depd\index.js:252:23)

how can I get the compitable versions of dependant modules

0 Likes

(John Gee) #2

(Moved to #support)

Hi @Ashish007! npm outdated might help. It does not tell you what versions are compatible, but does tell you what is outdated.

https://docs.npmjs.com/cli/outdated.html

0 Likes

(Ashish Naikwadi) #3

@shadowspawn I did update the version which were listed as outdated but still facing same issue for some of the dependent module, Do we have some one to look into it on priority as it is completely blocking our development.
Errors:
var file = callSite.getFileName() || ‘’
TypeError: callSite.getFileName is not a function
Dependent Module:
node_modules\body-parser\node_modules\depd\index.js:252:1234:
node_modules\sandboxed-module\lib\sandboxed_module.js:251:19
node_modules\body-parser\index.js:14:32)TypeError
Please let me know if you want more information on this.

0 Likes

(John Gee) #4

What is callSite in the file with the error? (I expect it is from an npm package, but which one?)

0 Likes

(Ashish Naikwadi) #5

Yes it is from npm package itself. callSite is been used in body-parser module.

0 Likes

(John Gee) #6

Note: looks like you have updated to the newest compatible version your package.json allows (e.g. chai 3.5.0), but there are still newer major versions available (e.g. chai 4.2.0). However, since major version may have breaking changes you may want to stay where you are until you are sure upgrading further is needed.

I found same TypeError: callSite.getFileName is not a function listed in depd issues here:

https://github.com/dougwilson/nodejs-depd/issues/28

There was a fix to esm, but I am not sure what that means for your package, sorry.

0 Likes

(Ashish Naikwadi) #7

@shadowspawn Yes you are right, at the moment we don’t need to upgrade to newer major versions, Yesterday I tried upgrading modules to major version but still couldn’t get luck with callSite issue.

I already walked through the https://github.com/dougwilson/nodejs-depd/issues/28 link yesterday but it seems they had issue with esm module but in our case it is with express module.
I’m not sure which express version we should upgrade for our application. Do you know where should we raise this concern? Should I tag some one from DEV team to address this issue?

0 Likes

(John Gee) #8

There are a number of links and resources on the Express GitHub page, and you will reach more express experts there: https://github.com/expressjs/express#docs--community

0 Likes

(John Gee) #9

Should I tag some one from DEV team to address this issue?

In this forum? No. You have a problem with an npm package and not with npm itself.

0 Likes