Where does meteor install npm packages referenced in packages.json?

Problem

After meteor installs npm packages:

npm: updating npm dependencies -- winston...

Npm.require results in module not found error, by inspecting the code and debugging via node-inspector, I discovered that putting a standard node_modules folder (installed via npm install) in .meteor folder in the root of my meteor app folder gets it to find it.

However when deploying to meteor.com or using any automated build-pack (like Heroku's) this might not be possible, I would rather have a scenario where I can link the automatically downloaded modules to the paths Npm.require looks in.

Any idea where it downloads the packages?

Thanks

Problem courtesy of: Dinana

Solution

For meteorite packages this would be:

/path/to/your/project/packages/package_name/.npm/package/node_modules/

For core meteor packages I guess this is

~/.meteor/packages/package_name/hash/npm/node_modules/

Solution courtesy of: Tomasz Lenarcik

Discussion

There is currently no discussion for this recipe.

This recipe can be found in it's original form on Stack Over Flow.