haloapi.js
haloapi.js copied to clipboard
TypeError: exists is not a function
When I try to load this package in my ember application I get an error, "TypeError: exists is not a function". I've tracked it down to a file in the index.js file in the codependency package in the exports.findPackage function. Not sure where to go from here.
I suspect you have a package installed that is clobbering require('fs')
within codependency.
- Which version of Node and npm are you using?
- Open a node console in your project root and type
require.resolve('fs')
. What does it give you? - Is there an
fs
directory innode_modules
? If so, delete it. - Is
fs
in yourpackage.json
? If so, remove it (fs
is in node core).
I did both 3 and 4 but it still isn't working.
I'm running node version 6.6.0 and npm version 3.10.3.
require.resolve('fs');
returns 'fs'
You seen be be resolving the correct fs
module. Does require('fs').existsSync
give you a function or undefined?
it returns [Function]