opencollective / opencollective-cli

Command Line Interface for Open Collective
MIT License
17 stars 12 forks source link

npm install fails on 1.0.4 #3

Closed choif closed 6 years ago

choif commented 6 years ago

Hi, I am seeing npm install failures after 1.0.4, also failed on build. https://ci.appveyor.com/project/xdamman/opencollective-cli/build/1.0.20/job/up6bocgtltvxugdf

npm ERR! path /Users/choif/repos/pub-component-product/node_modules/opencollective/dist/bin/opencollective.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod '/Users/choif/repos/pub-component-product/node_modules/opencollective/dist/bin/opencollective.js'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 
prabhu commented 6 years ago

I think your package is the new leftPad now. Our whole team is now stuck because one of the package we use has ^1.0.3 for opencollective.

asood123 commented 6 years ago

Sorry about that. We are working on fixing it right now.

amatiasq commented 6 years ago

NPM is on fire!!! 💩

asood123 commented 6 years ago

We unpublished the offending version to unblock everyone. Working on new version to get the original fix out.

prabhu commented 6 years ago

Please take your time for the new fix. Even Q4 2018 is actually very good.

qikkeronline commented 6 years ago

I am somehow getting this error when running NPM install in a Docker container, but not on my local machine using the exact same Node and NPM versions. Any reason why this can happen? About to start pulling hairs out 😁

kurtinatlanta commented 6 years ago

We get this error on our build box with (I believe 1.03):

> react-slick@0.18.0 postinstall <redacted>/node_modules/react-slick
> opencollective postinstall

sh: <redacted>/node_modules/.bin/opencollective: Permission denied

We don't get this problem with any of our other dependencies.

asood123 commented 6 years ago

can you upgrade to 1.04 please? We had an issue with 1.03.

kurtinatlanta commented 6 years ago

i'd prefer to not have this dependency at all and not have it run some postinstall script that breaks our builds.

i support what people are trying to do, but, ideally, you'd find a better way to achieve your goal.

if a transitive dependency to this project continues to cause us issues, we'll have to either avoid opencollective projects entirely, ask the owners to remove it (which one has already graciously done), or fork the repos and 'fix' them not to depend on opencollective.

asood123 commented 6 years ago

@kurtinatlanta point noted. :)

tsuna commented 6 years ago

I'm also still regularly running into this issue

npm ERR! path /code/web/node_modules/opencollective/dist/bin/opencollective.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod '/code/web/node_modules/opencollective/dist/bin/opencollective.js'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 
irrg commented 6 years ago

@asood123 re: your 1.0.4. comment…I'm interested in getting rid of my opencollective-cli related issues in my nuxt.js environment but 1.0.3 is the latest version published to npm?

irrg commented 6 years ago

I've seen several repos talking about @tsuna 's issue, for what it's worth. Including here https://github.com/nuxt/nuxt.js/issues/3025

xdamman commented 6 years ago

Sorry about those issues, we didn't realize there would be so many edge cases (node version 4x on multiple OS/environments, etc.).

We just published a very lightweight version that doesn't have any dependency: https://github.com/opencollective/opencollective-postinstall

Just replace in your package.json the opencollective dependency with opencollective-postinstall and in scripts.postinstall section, replace opencollective postinstall with opencollective-postinstall

Let us know your thoughts and pull requests welcome!

irrg commented 6 years ago

@xdamman awesome, testing in my fork now!

irrg commented 6 years ago

@xdamman worked out in my scenario and I've done pull requests for both the nuxt 1.4 branch and the current dev branch. FWIW, you might want to close the existing issues that came along with from the opencollective-cli repo 😜

ralphtheninja commented 6 years ago

i'd prefer to not have this dependency at all and not have it run some postinstall script that breaks our builds.

A quick tip is to append || exit 0 to the postinstall script. We use this in level, see https://github.com/Level/level/blob/ddd4a78884ac17648d024df684235070687394a7/package.json#L46

Maybe opencollective could suggest using this by default, or include that when making PRs when enabling open collective for a project?