Skip to content

Can't install in windows #13

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

Open
Asuka109 opened this issue Apr 9, 2020 · 1 comment
Open

Can't install in windows #13

Asuka109 opened this issue Apr 9, 2020 · 1 comment

Comments

@Asuka109
Copy link

Asuka109 commented Apr 9, 2020

Errors throwed when installing rn-webview-rpc from npm.
Windows CMD doesn't support cp -r dist/* .

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `cp -r dist/* .`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Dell\AppData\Roaming\npm-cache\_logs\2020-04-09T15_15_34_677Z-debug.log

But something confuses me is when I check git://github.com/ronhe/comlink.git, you know, "postinstall" doesn't exist in the packages.json. Is this something magic...?

Sorry for poor grammar.

@ronhe
Copy link
Owner

ronhe commented Apr 11, 2020

Hi @Asuka109,
First, please note that WebView api is deprecated both in iOS and Android, so I advise you not to use it for new projects.

Seconds, notice #dist at the end of git://github.com/ronhe/comlink.git#dist. It means that the comlinkjs dependency is installed from the dist branch where the postinstall script exists.

Third, to solve your error easily, you can run npm install rn-webview-rpc inside a console emulator, such as cmder or Git BASH.

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

2 participants