I had written in the book “Any time you install a Node module in the application directory, the module will get added to the dependencies list with the version you specified. Of course, you can manually make new entries or update the version numbers of existing dependencies if you want to.”, it has changed since npm was updated.
To automatically add the installed packages to the dependencies list in package.json, specify the --save option when you install the package. Here is an example:
$ npm install stylus --save
This will install the latest version of Stylus in the application directory and update package.json to reflect the change.