TypeError: exists not a function

I just started getting this error, it’s breaking my routing but I’m not sure where I need to start looking for troubleshooting it, it’s some dependency issue I assume but it doesn’t give me any error directly to my code or any particular module.

modules.js?hash=9660b22…:54916 Uncaught TypeError: exists is not a function
    at Function.getRoot (modules.js?hash=9660b22…:54916)
    at bindings (modules.js?hash=9660b22…:54818)
    at meteorInstall.node_modules.node-expat.lib.node-expat.js (modules.js?hash=9660b22…:1166)
    at fileEvaluate (modules-runtime.js?hash=b737023…:180)
    at require (modules-runtime.js?hash=b737023…:109)
    at meteorInstall.node_modules.xml2json.lib.xml2json.js (modules.js?hash=9660b22…:791)
    at fileEvaluate (modules-runtime.js?hash=b737023…:180)
    at require (modules-runtime.js?hash=b737023…:109)
    at meteorInstall.node_modules.xml2json.lib.index.js (modules.js?hash=9660b22…:778)
    at fileEvaluate (modules-runtime.js?hash=b737023…:180)

I’m using the kadira ssr flow router
node 6.1.0
meteor 1.4.1.3

thanks for any advice on this.

I should have looked at the error. I was assuming it was a red herring but xml2json is using node-expat which is using bindings, which is still using exists. Looks abadoned on github, moving to a different xml->json parser.

Hi pandabrand, I’m getting the exact same error when trying to use the mws-api package in Meteor. Did you figure out a workaround that you can share?

modules.js?hash=c0646c9…:103512 Uncaught TypeError: exists is not a function
    at Function.getRoot (modules.js?hash=c0646c9…:103512)
    at bindings (modules.js?hash=c0646c9…:103414)
    at meteorInstall.node_modules.node-expat.lib.node-expat.js (modules.js?hash=c0646c9…:103224)
    at fileEvaluate (modules-runtime.js?hash=2b888cb…:207)
    at require (modules-runtime.js?hash=2b888cb…:130)
    at meteorInstall.node_modules.xml2json.lib.xml2json.js (modules.js?hash=c0646c9…:101709)
    at fileEvaluate (modules-runtime.js?hash=2b888cb…:207)
    at require (modules-runtime.js?hash=2b888cb…:130)
    at meteorInstall.node_modules.xml2json.lib.index.js (modules.js?hash=c0646c9…:101696)
    at fileEvaluate (modules-runtime.js?hash=2b888cb…:207)
    at require (modules-runtime.js?hash=2b888cb…:130)
    at meteorInstall.node_modules.xml2json.index.js (modules.js?hash=c0646c9…:101682)
    at fileEvaluate (modules-runtime.js?hash=2b888cb…:207)
    at require (modules-runtime.js?hash=2b888cb…:130)
    at meteorInstall.node_modules.mws-api.lib.client.js (modules.js?hash=c0646c9…:759)
    at fileEvaluate (modules-runtime.js?hash=2b888cb…:207)

I switched from using xml2json package to xml-js. the mws-api has xml2json as a dependency, you could fork and update it to use that package instead.

1 Like