tower-archive / tower

UNMAINTAINED - Small components for building apps, manipulating data, and automating a distributed infrastructure.
http://tower.github.io
MIT License
1.79k stars 120 forks source link

TypeError: Object #<Object> has no method 'existsSync' #341

Closed iMagdy closed 11 years ago

iMagdy commented 11 years ago

I get this error when trying to generate new app:

islam@islam-desktop-dev:~$ sudo tower new app

            node.js:201
                throw e; // process.nextTick error, or 'error' event on first tick
                      ^
            TypeError: Object #<Object> has no method 'existsSync'
                at Object.<anonymous> (/usr/local/lib/node_modules/tower/index.js:6:21)
                at Module._compile (module.js:432:26)
                at Object..js (module.js:450:10)
                at Module.load (module.js:351:31)
                at Function._load (module.js:310:12)
                at Module.require (module.js:357:17)
                at require (module.js:368:17)
                at Object.<anonymous> (/usr/local/lib/node_modules/tower/bin/tower:15:3)
                at Module._compile (module.js:432:26)
                at Object..js (module.js:450:10)
lancejpollard commented 11 years ago

What version of node are you using? This is I think b/c either node 0.6 or 0.8 moved path.existsSync to fs.existsSync, so if you're using an old version of node then fs.existsSync will be broken.

Try upgrading your node version and let me know if that fixes it.

iMagdy commented 11 years ago

Using version v0.6.19 I'll try to upgrade to the current version and update you. Thanks :+1:

iMagdy commented 11 years ago

Wow! this fixed the problem!! :):):)

iMagdy commented 11 years ago

Thank you!

tremby commented 11 years ago

I had this issue too. Considered adding a helpful error message in this case?