Skip to content

angular-cli npm install results in errors making it not suitable for CI builds. #2599

Closed

Description

@MyOnlyGH

Please provide us with the following information:

OS?

Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
Win8.1

Versions.

Please run ng --version. If there's nothing outputted, please run in a Terminal: node --version and paste the result here:
angularcli- 1.0.0-beta.15
node - 6.7.0
OS- Win 32 x64

Repro steps.

Was this an app that wasn't created using the CLI? What change did you do on your code? etc.
yes, we are trying to create an app using CLI. While doing npm install, we get a few errors due to connection to github. We being behind an corporate firewall, use proxies to download all contents.
everything else works fine, but the angular-cli. That too, these new errors started coming with .16 and .17.
steps.

  1. have angular-cli.1.0.0-beta.16 or .17 in your package.json
  2. do npm install from behind a firewall (using proxies)

The log given by the failure.

Normally this include a stack trace and some more information.

<proj path>npm install -g angular-cli@latest
npm WARN addRemoteGit Error: Command failed: git -c core.longpaths=true config --get remote.origin.url
npm WARN addRemoteGit
npm WARN addRemoteGit     at ChildProcess.exithandler (child_process.js:206:12)
npm WARN addRemoteGit     at emitTwo (events.js:106:13)
npm WARN addRemoteGit     at ChildProcess.emit (events.js:191:7)
npm WARN addRemoteGit     at maybeClose (internal/child_process.js:877:16)
npm WARN addRemoteGit     at Socket.<anonymous> (internal/child_process.js:334:11)
npm WARN addRemoteGit     at emitOne (events.js:96:13)
npm WARN addRemoteGit     at Socket.emit (events.js:188:7)
npm WARN addRemoteGit     at Pipe._handle.close [as _onclose] (net.js:493:12)
npm WARN addRemoteGit  webpack/compression-webpack-plugin#<random number> resetting remot
e <userDirectory>\AppData\Roaming\npm-cache\_git-remotes\git-github-com-webpack-compression-webpack-plugi
n-git-<random hash number> because of error: { Error: Command failed: git -c core.lon
gpaths=true config --get remote.origin.url
npm WARN addRemoteGit
npm WARN addRemoteGit     at ChildProcess.exithandler (child_process.js:206:12)
npm WARN addRemoteGit     at emitTwo (events.js:106:13)
npm WARN addRemoteGit     at ChildProcess.emit (events.js:191:7)
npm WARN addRemoteGit     at maybeClose (internal/child_process.js:877:16)
npm WARN addRemoteGit     at Socket.<anonymous> (internal/child_process.js:334:11)
npm WARN addRemoteGit     at emitOne (events.js:96:13)
npm WARN addRemoteGit     at Socket.emit (events.js:188:7)
npm WARN addRemoteGit     at Pipe._handle.close [as _onclose] (net.js:493:12)
npm WARN addRemoteGit   killed: false,
npm WARN addRemoteGit   code: 1,
npm WARN addRemoteGit   signal: null,
npm WARN addRemoteGit   cmd: 'git -c core.longpaths=true config --get remote.origin.url' }
npm ERR! git clone --template=<user_directory>\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror
git://github.com/webpack/compression-webpack-plugin.git <user_directory>\AppData\Roaming\npm-cache\_git-re
motes\git-github-com-webpack-compression-webpack-plugin-git-<random number>: Clo
ning into bare repository '<user_directory>\AppData\Roaming\npm-cache\_git-remotes\git-github-com-webpack-
compression-webpack-plugin-git-<random hash>'...
npm ERR! git clone --template=<user_directory>\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror
git://github.com/webpack/compression-webpack-plugin.git <user_directory>\AppData\Roaming\npm-cache\_git-re
motes\git-github-com-webpack-compression-webpack-plugin-git-<random_number> fat
al: unable to connect to github.com:
npm ERR! git clone --template=<user_directory>\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror
git://github.com/webpack/compression-webpack-plugin.git <user_directory>\AppData\Roaming\npm-cache\_git-re
motes\git-github-com-webpack-compression-webpack-plugin-git-<random_number>: git
hub.com[0: <some_IP>]: errno=Invalid argument
npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please up
date to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated lodash-node@2.4.1: This package is discontinued. Use lodash@^4.0.0.
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated tough-cookie@2.2.2: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/
13

### Mention any other details that might be useful.
Please at let us know what exactly changed in .16 and .17 where npm install is impacted. It is now asking git to be installed and available in PATH and then above mentioned errors. We use Bamboo for our CI, and the moment our npm install task fails with an error, it stops building our application.
> ---------------------------------------------------------------
> Thanks! We'll be in touch soon.

Activity

  1. jwoehrle commented on Oct 10, 2016

    @jwoehrle

    can you try configuring git to always use https:// instead of git:// ?

    Try:
    git config --global url."https://".insteadOf git://

  2. filipesilva commented on Oct 10, 2016

    @filipesilva
    Contributor

    If that works, I can change the dependency to use git+https:// instead.

  3. MyOnlyGH commented on Oct 10, 2016

    @MyOnlyGH
    Author

    Thanks @jwoehrle, that suggestion did work on my local machine. So @filipesilva we should change the dependency.

    However, on our CI server we are still struggling with those error mentioned above. Unlike my local machine I am not able to start a direct connection to github on that restricted machine. Can we do anything about it?

    We are getting timeout error there "ssh: connect to host github.com port 22: connection timed out"

  4. filipesilva commented on Oct 14, 2016

    @filipesilva
    Contributor

    @MyOnlyGH if you get a ssh related error, it seems your CI is not using https. I'll put up a PR to use git+https:// but the real fix is to get a release of https://github.com/webpack/compression-webpack-plugin.

  5. added a commit that references this issue on Oct 14, 2016
    e986bae
  6. added a commit that references this issue on Oct 17, 2016
    b57d1bd
  7. added a commit that references this issue on Oct 19, 2016
    31f61d0
  8. added a commit that references this issue on Oct 21, 2016
    84b5513
  9. added a commit that references this issue on Nov 3, 2016
    440f24e
  10. angular-automatic-lock-bot commented on Sep 6, 2019

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  11. locked and limited conversation to collaborators on Sep 6, 2019
  12. added a commit that references this issue on May 29, 2026
    4a14d35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions