fyears / electron-python-example

Electron as GUI of Python Applications
MIT License
2.04k stars 232 forks source link

npm install error #13

Closed pilleye closed 7 years ago

pilleye commented 7 years ago

When I try to run $ npm install --runtime=electron --target=1.4.15 I get the error

npm ERR! git clone git@github.com:github:fyears/zerorpc-node Cloning into bare repository '/root/.npm/_git-remotes/git-github-com-github-fyears-zerorpc-node-aabe8777'... npm ERR! git clone git@github.com:github:fyears/zerorpc-node Warning: Permanently added the RSA host key for IP address '192.30.253.112' to the list of known hosts. npm ERR! git clone git@github.com:github:fyears/zerorpc-node Permission denied (publickey). npm ERR! git clone git@github.com:github:fyears/zerorpc-node fatal: Could not read from remote repository. npm ERR! git clone git@github.com:github:fyears/zerorpc-node npm ERR! git clone git@github.com:github:fyears/zerorpc-node Please make sure you have the correct access rights npm ERR! git clone git@github.com:github:fyears/zerorpc-node and the repository exists. npm ERR! notarget No compatible version found: zerorpc@'github:fyears/zerorpc-node' npm ERR! notarget Valid install targets: npm ERR! notarget ["0.1.0","0.2.0","0.3.0","0.4.0","0.5.0","0.6.0","0.6.1","0.7.0","0.7.1","0.7.2","0.7.3","0.7.4","0.8.0","0.8.1","0.8.2","0.8.3","0.8.4","0.8.5","0.8.6","0.8.7","0.8.8","0.9.0","0.9.1","0.9.2","0.9.3","0.9.4","0.9.5","0.9.6","0.9.7"] npm ERR! notarget npm ERR! notarget This is most likely not a problem with npm itself. npm ERR! notarget In most cases you or one of your dependencies are requesting npm ERR! notarget a package version that doesn't exist.

I'm not quite sure what's happening. I have installed npm and nodejs through apt-get.

Here's the npm-debug.log https://gist.github.com/adityarpillai/80000f77a54ab24aac57a87104ef536b

fyears commented 7 years ago

Hi,

Thanks for your support. :-) It seems to be a problem about downloading zerorpc-node dependency.

First of all, make sure you have git install, or just sudo apt-get install git -y to confirm.

Secondly, also make sure your git can access internet, try:

git ls-remote https://github.com/fyears/zerorpc-node.git

and no errors should occur.

Thirdly, I have updated the package.json to use the https:// protocol instead of git://. I have also updated the versions of Electron, etc.

So, please update your local copy of this repo, remember to clear the caches, and do npm install --runtime=electron --target=1.7.6 again.

If you still encounter any errors, please discuss the problem here again.

Thank you and good luck!

pilleye commented 7 years ago

Thank you so much for the prompt reply 👍 . This worked in combination with updating my npm to v5. However, I am running across two issues. First, it appears to be installing iojs version 1.7.6, I'm not sure if it's getting the number from the --target=1.7.6, but regardless it appears to be an invalid javascript io version. Second, it tries to install zeromq@4.6.0, which also fails. I'm not quite sure where that is going wrong, though.

Here's the gist of the details. https://gist.github.com/adityarpillai/4ee0798adcea9420e93e1372e7cdd3a9

Thanks for your support; have a good day :)

fyears commented 7 years ago

debug idea

So the problem indeed comes from zeromq. Your two issues come from the same zeromq problem. Maybe your nodejs is too old? The latest version (I tested on my machine) is nodejs v6. (I guess iojs being downloaded is because your nodejs being too old!)

I recommend you upgrade nodejs to v6 LTS (and its node-gyp and npm), and create a new empty folder, then try to only install zeromq inside the empty folder, and try to debug.

Clear the caches, then:

npm install --runtime=electron --target=1.7.6 zeromq@4.6.0

iojs should not be downloaded...

Once everything above is ok, you should be ok to npm install --runtime=electron --target=1.7.6 inside my repo.

advanced idea

If, after that, you still encounter the same issues... Well, I am sorry but you have to get your hands dirty. The basic idea is upgrading relevant libraries to the latest versions.

So, this repo <- zerorpc-node <- zeromq.js. Consider upgrading the zeromq.js dependency to the latest version, by modifying package.json of zerorpc-node and fix any bugs caused by version differences.

Good luck!

pilleye commented 7 years ago

Thank you so much again! I'll go ahead and close this since I was able to get it working with your support.