-
Notifications
You must be signed in to change notification settings - Fork 371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Meteor 1.3 build process + user-installed packages #90
Comments
Pinging @benjamn to see if he can offer some insight as a core developer. Question: can you describe at a high-level how user-installed node_modules are installed in a Meteor 1.3 project during the build process? Or if you have been Dockerizing meteor at all, any best-practices that you follow? I would like to add node_modules to my I saw that you were responsible for many of the commits to the import-scanner, which might be relevant to the conversation. |
We need to add an https://github.com/meteorhacks/meteord/blob/master/base/scripts/lib/build_app.sh#L10 That would install your app level NPM packages before building the app (the Although I have to admit, I'm not sure why Meteor >= 1.3 doesn't do that for you when you run And you're right, you should definitely |
For the client, we build a bundle of just what was imported, so the contents of On the server, the story is a bit more complicated. During The contents of However, if Given that, you should probably not blindly add |
Thanks for elaborating on that @benjamn! I've been Also, I think a container build should be able to work directly from a Is there a downside to doing this that I'm not seeing/understanding? |
We would like to improve the process of (re)(installing/building) npm packages on the server you're deploying to, but we need to work out the details. Running Another complication is the possibility of private (or purely local) packages that can't simply be redownloaded from npm. Private packages hosted by npm just need an None of these problems are unsolvable, but coming up with perfectly general solutions may be tricky. |
@benjamn thanks for all the notes. going to digest this and see if there is a better process. just an FYI, I wrote a blog post and sample docker image for how I'm dealing with npm install. i wrote this on feb 1 and have been deploying to production many, many times with it and it seems rock solid with absolutely zero issues. perhaps this process can be implemented into meteord/mup. http://markshust.com/2016/02/01/creating-custom-production-docker-image-meteor-13 |
Really happy to see the progress made on this issue today. Thanks for everyone for chiming in. @benjamn -- Thanks for your great insights. Obviously a complicated process, and something that generally "just works" for users of Meteor, when in reality there is a lot happening under the covers @jshimko thanks for the specific suggestion -- I forked meteord and made that change. Will test it out tomorrow and submit a PR with documentation. Would appreciate your help in testing it out if you are available tomorrow. @markoshust I will also try to incorporate your ideas, especially when it comes to simplifying the build process in general and moving as much of it as possible to the Dockerfile. That declarative style I think ultimately helps with legibility and maintainability. |
I am a little bit confused as to how the new module process works in Meteor 1.3, and after scouring Github and the Meteor forum for a definitive answer, I thought that maybe I could get some clarification here. This stems from a failing build using
meteord:onbuild
that previously worked using only Atmosphere/meteor packages.I am trying to understand how exactly user-installed npm modules (of the meteor npm install --save variety) are installed during the
meteor build
process. My reading of the literature so far seems to suggest that the local node_modules directory is copied over into the build environment, but that seems like it doesnt make sense because it would hurt cross-platform compatibility and mess up any package post-install build scripts that build from source. Also, this seems like a bad idea because it makes the the build context MUCH MUCH larger --node_modules
should ultimately be excluded in both the.gitignore
and.dockerignore
files.Anyone have any insight into the best way to combine Docker with Meteor 1.3?
The text was updated successfully, but these errors were encountered: