Skip to content
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

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

Closed
MyOnlyGH opened this issue Oct 9, 2016 · 5 comments · Fixed by #2709
Closed

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

MyOnlyGH opened this issue Oct 9, 2016 · 5 comments · Fixed by #2709

Comments

@MyOnlyGH
Copy link

MyOnlyGH commented Oct 9, 2016

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 [email protected]: 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 [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: This package is discontinued. Use lodash@^4.0.0.
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: 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.
@jwoehrle
Copy link

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

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

@filipesilva
Copy link
Contributor

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

@filipesilva filipesilva added the needs: more info Reporter must clarify the issue label Oct 10, 2016
@MyOnlyGH
Copy link
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"

@filipesilva
Copy link
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.

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants