简体   繁体   中英

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

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

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/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM