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

Failed at the react-native-router-flux@4.0.0-beta.7 postinstall script 'opencollective postinstall'. #2008

Closed
isAlmogK opened this issue Jul 11, 2017 · 20 comments

Comments

@isAlmogK
Copy link

Can't install the package

~/Full-Time-Employment/Construction-Cloud/RnD/CCMobileApp(branch:development*) » npm i react-native-router-flux --save Almog@Almogs-MacBook-Pro

react-native-router-flux@4.0.0-beta.7 postinstall /Users/Almog/Full-Time-Employment/Construction-Cloud/RnD/CCMobileApp/node_modules/react-native-router-flux
opencollective postinstall

sh: opencollective: command not found
npm WARN enoent ENOENT: no such file or directory, open '/Users/Almog/Full-Time-Employment/Construction-Cloud/RnD/CCMobileApp/node_modules/react-native-drawer-layout/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/Users/Almog/Full-Time-Employment/Construction-Cloud/RnD/CCMobileApp/node_modules/react-native-drawer-layout-polyfill/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/Users/Almog/Full-Time-Employment/Construction-Cloud/RnD/CCMobileApp/node_modules/react-native-tab-view/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/Users/Almog/Full-Time-Employment/Construction-Cloud/RnD/CCMobileApp/node_modules/react-navigation/package.json'
npm WARN react-native-elements@0.13.0 requires a peer of react-native-vector-icons@~4.1.1 but none was installed.
npm ERR! Darwin 15.6.0
npm ERR! argv "/Users/Almog/.nvm/versions/node/v6.9.5/bin/node" "/Users/Almog/.nvm/versions/node/v6.9.5/bin/npm" "i" "react-native-router-flux" "--save"
npm ERR! node v6.9.5
npm ERR! npm v3.10.10
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn

npm ERR! react-native-router-flux@4.0.0-beta.7 postinstall: opencollective postinstall
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the react-native-router-flux@4.0.0-beta.7 postinstall script 'opencollective postinstall'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the react-native-router-flux package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! opencollective postinstall
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs react-native-router-flux
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls react-native-router-flux
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /Users/Almog/Full-Time-Employment/Construction-Cloud/RnD/CCMobileApp/npm-debug.log

@isAlmogK
Copy link
Author

beta v6 works - npm i react-native-router-flux@4.0.0-beta.6 --save

@aksonov
Copy link
Owner

aksonov commented Jul 11, 2017

@xdamman Could you look at it?

@aksonov
Copy link
Owner

aksonov commented Jul 11, 2017

@AlmogRnD Please try yarn yarn add react-native-router-flux@4.0.0-beta.7
@xdamman may fix it for npm, for next beta, I guess...

@isAlmogK
Copy link
Author

@aksonov thanks, Yarn works

@xdamman
Copy link
Contributor

xdamman commented Jul 11, 2017

Thanks for bringing my attention to this. What node version are you using? On a Mac?
I cannot reproduce it yet.
This is what I see

@aksonov
Copy link
Owner

aksonov commented Jul 11, 2017

Mac, npm 4.2.0

@xdamman
Copy link
Contributor

xdamman commented Jul 11, 2017

and actually all the answers to my questions where in the log above ¯_(ツ)_/¯
node v6.9.5
npm v3.10.10

Still digging into this.

@xdamman
Copy link
Contributor

xdamman commented Jul 11, 2017

works for me with node v6.95 and npm v.3.10.10 🤔
and opencollective is not in my PATH. Not sure what else I can try...

@xdamman
Copy link
Contributor

xdamman commented Jul 11, 2017

So basically, this means that somehow it didn't link ./node_modules/.bin/opencollective to ./node_modules/opencollective/dist/bin/opencollective.js OR that it doesn't add automatically ./node_modules/.bin/ to the PATH when running npm install.

@aksonov
Copy link
Owner

aksonov commented Jul 12, 2017

@xdamman Could we just run ./node_modules/.bin/opencollective instead to avoid that?

@xdamman
Copy link
Contributor

xdamman commented Jul 12, 2017

Does it work for you locally when you change the postinstall script to that command? (I couldn't reproduce the issue so cannot test)

@aksonov
Copy link
Owner

aksonov commented Jul 12, 2017

@xdamman Yes, it works. I've just submitted it to PR #2015

@xdamman
Copy link
Contributor

xdamman commented Jul 12, 2017

Good to know that it solved the issue. That's weird that somehow npm is not considering ./node_modules/.bin as a source of executable files in your setup (but it does in mine). Curious if others have the same issue.

Thanks for spending the time to figure this out 👍

@aksonov aksonov mentioned this issue Jul 12, 2017
@aksonov
Copy link
Owner

aksonov commented Jul 13, 2017

Should be fixed with v4 beta.8

@aksonov aksonov closed this as completed Jul 13, 2017
@OrangeFlavoredColdCoffee

image

@aksonov
Copy link
Owner

aksonov commented Jul 30, 2018 via email

@al-pt-old
Copy link

image

@al-pt-old
Copy link

~Two days ago that was working fine.

@al-pt-old
Copy link

Works fine with

node_js:

  • "8.10"

but not with node 8.12v

@daviscabral
Copy link
Collaborator

Thank you for reporting - but beta versions are not supported.

You can use resolutions in your package.json to lock the opencollective version to one that might work in your environment.

Repository owner locked as resolved and limited conversation to collaborators Sep 11, 2018
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

6 participants