linemanjs / lineman

Lineman helps you build fat-client JavaScript apps. It produces happiness by building assets, mocking servers, running specs on every file change
MIT License
1.18k stars 82 forks source link

lineman install can't connect to git for cscodegen #351

Closed aspergillusOryzae closed 9 years ago

aspergillusOryzae commented 9 years ago

I am having trouble installing lineman - first I tried with the apt-get version of node and npm, then with node 0.10.32, 0.12.X, and now 0.10.36 (because cscodegen requests node 0.8.x through 0.10.x). npm WARN engine coffee-script-redux@2.0.0-beta8: wanted: {"node":"0.8.x || 0.10.x"} (current: {"node":"0.12.0","npm":"2.5.1"})

I am running into the same issue across all node/npm version when the script is attempting to grab cscodegen from git.

me@ubuntu:~$ sudo npm install -g lineman
> js2coffee@0.3.3 preinstall /usr/lib/node_modules/lineman/node_modules/js2coffee
> node ./cyclic.js

> ws@0.4.32 install /usr/lib/node_modules/lineman/node_modules/testem/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

make: Entering directory `/usr/lib/node_modules/lineman/node_modules/testem/node_modules    /socket.io/node_modules/socket.io-client/node_modules/ws/build'
  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
  SOLINK_MODULE(target) Release/obj.target/bufferutil.node
  SOLINK_MODULE(target) Release/obj.target/bufferutil.node: Finished
  COPY Release/bufferutil.node
  CXX(target) Release/obj.target/validation/src/validation.o
  SOLINK_MODULE(target) Release/obj.target/validation.node
  SOLINK_MODULE(target) Release/obj.target/validation.node: Finished
  COPY Release/validation.node
make: Leaving directory `/usr/lib/node_modules/lineman/node_modules/testem/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build'
npm ERR! git clone git://github.com/michaelficarra/cscodegen.git Cloning into bare repository '/home/me/.npm/_git-remotes/git-github-com-michaelficarra-cscodegen-git-c4b567f3'...
npm ERR! git clone git://github.com/michaelficarra/cscodegen.git fatal: unable to connect to github.com:
npm ERR! git clone git://github.com/michaelficarra/cscodegen.git github.com[0: 192.30.252.128]: errno=Connection refused
npm WARN optional dep failed, continuing cscodegen@git://github.com/michaelficarra/cscodegen.git#73fd7202ac086c26f18c9d56f025b18b3c6f5383
searls commented 9 years ago

Sounds like a connectivity issue. Not able to replicate over here and that repo is still live.

On Wed, Feb 25, 2015 at 9:55 PM, aspergillusOryzae notifications@github.com wrote:

I am having trouble installing lineman - first I tried with the apt-get version of node and npm, then with node 0.10.32, 0.12.X, and now 0.10.36 (because cscodegen requests node 0.8.x through 0.10.x). npm WARN engine coffee-script-redux@2.0.0-beta8: wanted: {"node":"0.8.x || 0.10.x"} (current: {"node":"0.12.0","npm":"2.5.1"}) I am running into the same issue across all node/npm version when the script is attempting to grab cscodegen from git. me@ubuntu:~$ sudo npm install -g lineman

js2coffee@0.3.3 preinstall /usr/lib/node_modules/lineman/node_modules/js2coffee node ./cyclic.js

ws@0.4.32 install /usr/lib/node_modules/lineman/node_modules/testem/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws (node-gyp rebuild 2> builderror.log) || (exit 0) make: Entering directory /usr/lib/node_modules/lineman/node_modules/testem/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build' CXX(target) Release/obj.target/bufferutil/src/bufferutil.o SOLINK_MODULE(target) Release/obj.target/bufferutil.node SOLINK_MODULE(target) Release/obj.target/bufferutil.node: Finished COPY Release/bufferutil.node CXX(target) Release/obj.target/validation/src/validation.o SOLINK_MODULE(target) Release/obj.target/validation.node SOLINK_MODULE(target) Release/obj.target/validation.node: Finished COPY Release/validation.node make: Leaving directory/usr/lib/node_modules/lineman/node_modules/testem/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build' npm ERR! git clone git://github.com/michaelficarra/cscodegen.git Cloning into bare repository '/home/me/.npm/_git-remotes/git-github-com-michaelficarra-cscodegen-git-c4b567f3'... npm ERR! git clone git://github.com/michaelficarra/cscodegen.git fatal: unable to connect to github.com: npm ERR! git clone git://github.com/michaelficarra/cscodegen.git github.com[0: 192.30.252.128]: errno=Connection refused

npm WARN optional dep failed, continuing cscodegen@git://github.com/michaelficarra/cscodegen.git#73fd7202ac086c26f18c9d56f025b18b3c6f5383

Reply to this email directly or view it on GitHub: https://github.com/linemanjs/lineman/issues/351

aspergillusOryzae commented 9 years ago

I am behind a proxy, but was able to do the following commands (as well as set this up on another computer a few months ago in the same conditions):

npm config set proxy http://proxy.company.com:80
npm config set https-proxy http://proxy.company.com:80
npm config set strict-ssl false
aspergillusOryzae commented 9 years ago

I also did npm cache clean

aspergillusOryzae commented 9 years ago

Interestingly using the versions of npm and nodejs from apt-get provide the most success, and it also seems to only be that one repos - though yes I could see its still up, but I had trouble cloning it behind the proxy or with the http url:

me@ubuntu:/usr/bin$ node --version
v0.10.25
me@ubuntu:/usr/bin$ npm --version
1.3.10
me@ubuntu:/usr/bin$ sudo npm install -g lineman
npm ERR! not a package /home/me/tmp/npm-68817-htiICuqH   /1424914317147-0.11728683928959072/tmp.tgz
npm http GET https://registry.npmjs.org/lineman
...
npm http GET https://registry.npmjs.org/zeparser/0.0.5
npm http GET https://registry.npmjs.org/tinycolor
npm http GET https://registry.npmjs.org/commander
npm http GET https://registry.npmjs.org/nan
npm http GET https://registry.npmjs.org/options
npm http 304 https://registry.npmjs.org/uglify-js
npm http 304 https://registry.npmjs.org/zeparser/0.0.5
npm http 304 https://registry.npmjs.org/tinycolor
npm http 304 https://registry.npmjs.org/nan
npm http 304 https://registry.npmjs.org/commander
npm http 304 https://registry.npmjs.org/options

> ws@0.4.32 install /usr/local/lib/node_modules/lineman/node_modules/testem/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

make: Entering directory `/usr/local/lib/node_modules/lineman/node_modules/testem/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build'
  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
  SOLINK_MODULE(target) Release/obj.target/bufferutil.node
  SOLINK_MODULE(target) Release/obj.target/bufferutil.node: Finished
  COPY Release/bufferutil.node
  CXX(target) Release/obj.target/validation/src/validation.o
  SOLINK_MODULE(target) Release/obj.target/validation.node
  SOLINK_MODULE(target) Release/obj.target/validation.node: Finished
  COPY Release/validation.node
make: Leaving directory `/usr/local/lib/node_modules/lineman/node_modules/testem/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build'
npm ERR! git clone git://github.com/michaelficarra/cscodegen.git Cloning into bare repository '/home/me/.npm/_git-remotes/git-github-com-michaelficarra-cscodegen-git-c4b567f3'
npm ERR! git clone git://github.com/michaelficarra/cscodegen.git fatal: unable to connect to github.com:
npm ERR! git clone git://github.com/michaelficarra/cscodegen.git github.com[0: 192.30.252.129]: errno=Connection refused
npm WARN optional dep failed, continuing cscodegen@git://github.com/michaelficarra/cscodegen.git#73fd7202ac086c26f18c9d56f025b18b3c6f5383
npm http GET https://registry.npmjs.org/abbrev
npm http GET https://registry.npmjs.org/esprima
npm http GET https://registry.npmjs.org/estraverse
npm http GET https://registry.npmjs.org/amdefine
...
aspergillusOryzae commented 9 years ago

sudo chown -R me:me ~/tmp/ seems to allow me to successfully perform a mvn clean install after using the apt-get versions of node and npm and installing as in the previous comment, but it still complains about not connecting to the library missing dependency: npm WARN optional dep failed, continuing cscodegen@git://github.com/michaelficarra/cscodegen.git#73fd7202ac086c26f18c9d56f025b18b3c6f5383

-- update -- Pulling the machine out of the proxy env and deleting the npm config proxy and https-proxy allowed the install to complete without issues. If I wasn't developing on a laptop that would be hard though. It is strange that the issue is limited to that one repository.

davemo commented 9 years ago

This is a pretty common symptom of being behind a firewall; we've seen this at some clients with network restrictions in place. Given you've already done npm config set strict-ssl false, my best advice is to speak with your IT department and get them to relax the firewall rules in place or setup an exemption for npm traffic.

My experience with any other method, including proxies, local caches or mirrors of the npm repo has been fraught with nothing but headaches :(