Install a package on the fly


#1

Hi,

how can i install a package with code on a running meteor instance?

thanks for help


#2

In .meteor/packages you can just remove or add packages as you see fit.

For example:

# Meteor packages used by this project, one per line.
#
# 'meteor add' and 'meteor remove' will edit this file for you,
# but you can also edit it by hand.

standard-app-packages
insecure
autopublish

You can remove insecure and autopublish while the server is running just by deleting them from this file.


#3

Are you sure this works with bundled code?


#4

@gabrielhpugliese is right… You can’t add packages like that to a bundled application.


#5

Oh I misunderstood the question. This question I do not have the answer for.


#6

Client side packages can in theory be extracted out to live in the public folder and loaded on demand with one of the lazy loading packages you can find on atmosphere.

Server side packages would be hard to get right, but might be possible by reading in from the private folder as assets, parsing them and eval()ing them. Yikes! :smile:


#7

Yeah. It honestly seems easier and less hacky to just rebuild and push the server again.


#8

thanks for all answers,

the hot code push packages like arsnebula:appupdate or gwendall:remote-autoupdate works on a bundled meteor app?

push this packages only client side code?

meteor unbundled in production is not recommended right?

thanks,