Skip to content
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

Add a flag to disable npm rebuild #21

Open
adrien-f opened this issue Aug 28, 2015 · 8 comments
Open

Add a flag to disable npm rebuild #21

adrien-f opened this issue Aug 28, 2015 · 8 comments

Comments

@adrien-f
Copy link

Hello,

Would it be possible to add a flag or a config key to disable npm rebuild after extracting ? Or is there a specific reason for it to run everytime?

@vladikoff
Copy link
Member

Or is there a specific reason for it to run everytime?

I find that most of my projects have some sort of a npm build step, i.e libsass or some crypto thing.
If npm rebuild is disabled then some modules would not work correctly.
If you have no modules that require a build step then it should just skip it.

I feel like it is a good feature suggestion, but could you please describe what issues you are having so I can capture it in a test case?

@divmgl
Copy link
Contributor

divmgl commented Oct 4, 2015

Is there any reason why npm rebuild is not run on the Freight server itself? Right now npm rebuild is slowing down the process of even going through Freight so I may drop Freight altogether.

@SlexAxton
Copy link
Member

Running rebuild on the freight server itself wouldn't be helpful. It either builds correctly for your environment (your resulting server matches your freight server) during the initial install, or it doesn't, which makes the rebuild necessary to run on the resulting machine.

is slowing down the process of even going through Freight so I may drop Freight altogether

If the alternative is doing an npm install then you'd still have to do all of the same things, but the download will take longer. A rebuild is included in an npm install.

It certainly seems like we could make the rebuild optional, though, potentially based on an environment variable (so local installs still rebuild, but server installs don't).

@divmgl
Copy link
Contributor

divmgl commented Oct 4, 2015

I think I am approaching the deployment of my application incorrectly, so I will be revising it now. Thanks for your feedback.

@vladikoff
Copy link
Member

To sum it up: if you don't do npm rebuild locally then some modules will not work correctly. If there are no modules that require a "rebuilt" step then npm rebuild will be very quick anyway (it just skips through it).

We can consider adding this option if someone really wants it for some edge case.

@sterpe
Copy link

sterpe commented Oct 8, 2015

The only value I could see is if you knew that all of your compilation was related to dev dependencies and you didn't care about that for a deployment

@SlexAxton
Copy link
Member

I'm reopening this issue for the following use-case (and the fact that I think it'll be easy to implement):

Our freight server is the exact same AWS AMI/machine as our CI servers that download the freight bundles. So I think that we can optimize our CI builds by just assuming that the initial build on the freight machine will be compatible with the CI server. However, locally, we'd still require a rebuild. So the option would be useful as part of our production/testing build-scripts, but not necessarily for everyday development.

@SlexAxton SlexAxton reopened this Apr 4, 2016
@mikekoetter
Copy link

We would find this very useful.
To be able drop in dependencies in a controlled environment where you don't want to carry the compiling environment along

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants