Thanks all for responding.
After much googling and spending time on my issue, I was able to solve my problem.
I thought it would be better to post an answer if anyone faces the similar dilemma.
Below is the documentation, where I found my answer https://devcenter.heroku.com/articles/nodejs-support
By default, in heroku production is set to true. That's why only dependencies get installed. ( & skips devDependencies )
heroku config:set NPM_CONFIG_PRODUCTION=false
Set production to false, to force heroku to install all packages.
** Only do this if doing development.
Heroku, by default, caches all the dependencies, so that the deployment is faster.
heroku config:set NODE_MODULES_CACHE=false
$ git commit -am 'disable node_modules cache' --allow-empty
$ git push heroku master
** Preferable only if new dependencies are added in package.json
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…