fix bug in npm install with packageDir