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

Remove promotional banner on postinstall #1189

Closed
ghost opened this issue Dec 22, 2017 · 17 comments
Closed

Remove promotional banner on postinstall #1189

ghost opened this issue Dec 22, 2017 · 17 comments

Comments

@ghost
Copy link

ghost commented Dec 22, 2017

I'm using nodemon since a long time. Suddenly it started to show this banner on every install:

> nodemon@1.14.1 postinstall /home/guu/workspace/programming/code/IGZ/AZLO/services/openplatform-sandbox-service/node_modules/nodemon
> node -e "console.log('\u001b[32mLove nodemon? You can now support the project via the open collective:\u001b[22m\u001b[39m\n > \u001b[96m\u001b[1mhttps://opencollective.com/nodemon/donate\u001b[0m\n')"

Love nodemon? You can now support the project via the open collective:
 > https://opencollective.com/nodemon/donate

I think that's not the purpose of the postinstall script. But aside from that, I have dozens of services and countless pipelines where this is being shown too many times.

I consider this to be unnecessary SPAM.

Is it possible to remove that promotion and just leave it in the README page instead? Thanks

@remy
Copy link
Owner

remy commented Dec 22, 2017

Thanks for your feedback. You use nodemon on dozens of projects you say? I assume you're supporting the project somehow? If not, I guess my method to promote the problem is working. Cheers.

@remy remy closed this as completed Dec 22, 2017
@spencerhakim
Copy link

@remy Hijacking this issue: using node just to print to the console is overkill, and I'm running into an issue installing this package with Docker + nvm where it can't find the node executable during postinstall (for whatever reason). Could you just simplify this to an echo call?

@remy
Copy link
Owner

remy commented Jan 3, 2018

@spencerhakim I know what you mean, but node in one process that I can be sure that would be installed (but you're right, it might not be in the path). I'm not entirely sure what would happen if I ran echo on Windows…

Related, I do want to suppress the message if nodemon is in CI (though I'm not entirely convinced nodemon should even be installed under CI!)

@spencerhakim
Copy link

@remy I'd generally agree with your sentiment regarding nodemon in CI, but my build process requires other devDeps so I don't have much of a choice in that regard. Regardless, I need to fix my PATH issue since even if remove nodemon, my project's npm start fails to find node. Love returning from the holidays to find that something like this no longer works...

@kosmotaur
Copy link

@IGZgustavomarin if it's too much to take, npm i > /dev/null 🙈

@attrox
Copy link

attrox commented Jan 10, 2018

This promotional message broke ansible task because it's treated as a failure.

@remy
Copy link
Owner

remy commented Jan 10, 2018

@attrox what version of nodemon were you testing with? The postinstall in the latest code is designed to fail gracefully: 64a82ff?diff=split

@attrox
Copy link

attrox commented Jan 10, 2018

@remy it's 1.14.10
It does have the " || exit 0" bit, but Ansible still fails at that point.

@remy
Copy link
Owner

remy commented Jan 10, 2018

@attrox Do you want to create a new issue - and possibly help with any ideas on how to get Ansible to accept the exit 0? I'd also suggest including the output you're seeing so more eyes (hopefully!) can get ideas.

@attrox
Copy link

attrox commented Jan 11, 2018

I finally found the Ansible fix for this
- name: Install Npm packages
command: npm install
register: result
failed_when: "result.stderr is defined and 'ERR!' in result.stderr"

@Janpot
Copy link

Janpot commented Jan 12, 2018

Can I make the message disappear by donating?

@remy
Copy link
Owner

remy commented Jan 12, 2018

@Janpot you can but only try. And just think, if there's enough momentum around the open collective route, then it'll probably drive itself and not need the banner.

@Janpot
Copy link

Janpot commented Jan 13, 2018

🙂 I'm just playing the devil's advocate. I prefer to contribute in a different way. I wish you success on your journey though.

@ghost
Copy link
Author

ghost commented Feb 5, 2018

Imagine a situation when you need to install one package with a lot of dependencies and the screen fills with such "asking for donations" messages.

The time will come, and we would have adblockers for terminals, but for now you can run this:

> npm remove -g nodemon
> npm install -g forever
> cd /path/to/your/project
> forever start --watch .
> forever logs -f .

There are many alternatives, which you can use freely, just remember that.

Not that I'm against your project, or I don't want to donate... actually I will not donate anything, just because you explicitly ask for it after each install.

@ghost
Copy link
Author

ghost commented Feb 5, 2018

@remy I said dozens of services, a single project with lots of different services that use nodemon during development. Each commit that is merged to master triggers a build > test > deploy. During test phase, nodemon is installed (even its only used for dev, not tests) and I get the banner on every commit, every pipeline. I see this message hundred of times a day, for one project with a microservice architecture. That's is why I'm complaining about it.

@remy
Copy link
Owner

remy commented Feb 5, 2018

actually I will not donate anything, just because you explicitly ask for it after each install

Not supporting the project because it asks for support. Classy. I'm glad you've (all) got alternative tools to use, at least you're not stuck.

It's a bit of a shame that the only suggestions on this thread have been to remove the request for support, to complain or to just be a bit snarky. It's a shame no one has come up with a solution like…I don't know, maybe a PR that's smart that detects that the message has been shown in the last 24 hours and doesn't show it again for that day using a (root) config flag?

A real shame.

Repository owner locked and limited conversation to collaborators Feb 5, 2018
@remy
Copy link
Owner

remy commented May 5, 2018

For those using nodemon in a CI-type environment, no one actually came up a with a solution or a PR to help this process, but I've just submitted this PR which should help your situation.

See FAQ for more: https://github.com/remy/nodemon/pull/1334/files#diff-4a1318da06786ac52626178ca960109eR43

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

No branches or pull requests

5 participants