NPM 1.3.9 don't let me run npm on target folder

trying to run a automatic deployment script for developers and it seems i reach a point where i found a bug.

when i run

sudo npm install 

It works and install the whole dependencies of the package, but if i run

sudo npm install <folder> 

it doesn't complain about a missing package.json but it doesn't install all dependencies, which drives me afterward to a problem with bower and then with grunt. It seems i hitter a bug or something that doesn't allows me to do the thing in the way it should do it. Anyone of you has any advice? maybe an upgrade?

Version 1.3.9 Running Centos 6.5

Whats its happening?