socket.io icon indicating copy to clipboard operation
socket.io copied to clipboard

Unable to install socket.io on the intranet

Open msmolyak opened this issue 11 years ago • 11 comments

When running

npm install socket.io --save

I am getting this error:

npm ERR fetch failed https://github.com/rase-/node-XMLHttpRequest/archive/a6b6f2.tar.gz

Apparently this archive is a dependency of the socket.io package. I am on the intranet with no connectivity to the Internet. How can I install socket.io?

I can obtain the TAR file on the intranet, but where would I place it to satisfy the dependency?

Also, is it possible to avoid building the module altogether by somehow obtaining a version pre-built for my platform (CentOS 6)?

msmolyak avatar Aug 17 '15 20:08 msmolyak

Windows 7, SP1, x64

Same issue. My intranet causes the following line after error in previous post:

npm WARN retry will retry, erorr on last attempt: Error: certificate not trusted

I've found a round way:

  1. Navigate to where this dependency is located
  2. Download this tarball
  3. Install in manually.

Error will disappear. _But this is not right way._

ichyr avatar Aug 18 '15 13:08 ichyr

Are you behind a proxy?

1j01 avatar Sep 07 '15 02:09 1j01

I am on the intranet without access to the internet. I can import files from the internet, but the npm installation process does not have internet access.

msmolyak avatar Sep 07 '15 03:09 msmolyak

ichyr, what do you mean by "install it manually". How do you install a TAR archive?

msmolyak avatar Sep 07 '15 03:09 msmolyak

Get tar archive to my remove machine and ( as here: https://docs.npmjs.com/cli/install )

npm install <tarball file>:

Install a package that is sitting on the filesystem. Note: if you just want to link a dev directory into your npm root, you can do this more easily by using npm link.

Example:

    npm install ./package.tgz

ichyr avatar Sep 07 '15 07:09 ichyr

Hi ichyr,

I am able to install the XMLHttpRequest from the tarball, however this does not do anything to fix the original problem - npm install of socket.io still tries to download the a6.b6f2.tar.gz from GitHub. How did you stop npm form following the dependency to GitHub?

Thank you,

Michael

msmolyak avatar Oct 08 '15 19:10 msmolyak

I needed to install karma test runner. I've tried installing the latest one, but resulted in this error we are talking about here. Thus asked guys from other project in my room. I ended up installing version they use and it works: 0.10.10 ( or 0.10.9 )

You may find sources here to dig in the version socket.io references there.

https://github.com/karma-runner/karma/releases/tag/v0.10.9

package.json there references version 0.9.13 - "socket.io": "~0.9.13",

ichyr avatar Oct 08 '15 19:10 ichyr

Is this going to be fixed please?

I am in the same situation, also webpack, karma-webpack and protractor fail for the same reason. We are using corporate nexus instance to cache npm repos (common setup in multiple companies), but github.com dependencies can not be cached there.

Thanks

vladimir-ivanov avatar Dec 17 '15 16:12 vladimir-ivanov

as a work around used shrinkwrap to fix the dependencies https://gist.github.com/vladimir-ivanov/3c3ef070d73301ca3ccd but note that the xmlhttprequest dependency is NOT the one

I ended up cloning the repo in question, modifying the package.json to have a custom version e.g. 1.1.0.socketioFix or whatever (to avoid version collisions with the original library)

and put it into nexus then reference that one in npm-srhinkwrap.json file e.g. "xmlhttprequest": { "version": "1.5.0", "from": "http://local-nexus-repo/content/groups/npm-all/xmlhttprequest/-/xmlhttprequest-1.5.0.socketIoFix.tgz", "resolved": "http://local-nexus-repo/content/groups/npm-all/xmlhttprequest/-/xmlhttprequest-1.5.0.socketIoFix.tgz" }

vladimir-ivanov avatar Dec 18 '15 10:12 vladimir-ivanov

AFAIK, this should be fixed now with the 1.4.0 release

yotamshapira avatar Jan 07 '16 00:01 yotamshapira

That issue was closed automatically. Please check if your issue is fixed with the latest release, and reopen if needed (with a fiddle reproducing the issue if possible).

darrachequesne avatar Jan 12 '17 15:01 darrachequesne