opencollective/opencollective-postinstall

opencollective-postinstall: command not found

KoryNunn opened this issue · 5 comments

Hi, this is more of an FYI. I decided to remove the postinstall step from my project as it caused an issue in someones process. I would suggest looking into making this command fail quietly, as it's non-critical and should not get in the way of peoples core task.

Details: KoryNunn/scroll-into-view#66

znarf commented

@KoryNunn in the case you mentioned, this is not related to the opencollective-postinstall codebase because the user was actually complaining about the command not being available. This means for some reason the package was not installed, or npm was confused.

I looked at the original bug issue you linked, and there is not enough details to investigate.

To fail safe, maybe we can recommend to configure it that way:

"postinstall": "opencollective-postinstall || true"

Yeah I don't think there is anything to investigate from your side, I just think making the default fail quietly as in your suggetion is the way to go.

Actually, a second benifit could be that you could move the deps to devDeps, since then they would only run when a developer is likely to see the message. Having random messages show up in prod builds is probably not prefereable anyway.

I just had someone complain about command not found, even with the || true supplement:
CirclonGroup/angular-tree-component#749

@znarf
Can someone help solve this to make sure it doesn't fail installs?
Thanks

Looks like the || true approach won't be cross-platform.

Maybe || exit 0 could work. But again, using the OR || operator won't work in PowerShell. Idk any canonical way to address this :/