Repository navigation
angular-cli npm install results in errors making it not suitable for CI builds. #2599
Copy link
Copy link
Closed
Labels
Description
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 --versionand 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.
- have angular-cli.1.0.0-beta.16 or .17 in your package.json
- 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
jwoehrle commentedon Oct 10, 2016
can you try configuring git to always use https:// instead of git:// ?
Try:
git config --global url."https://".insteadOf git://filipesilva commentedon Oct 10, 2016
If that works, I can change the dependency to use
git+https://instead.MyOnlyGH commentedon Oct 10, 2016
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 commentedon Oct 14, 2016
@MyOnlyGH if you get a
sshrelated error, it seems your CI is not using https. I'll put up a PR to usegit+https://but the real fix is to get a release of https://github.com/webpack/compression-webpack-plugin.chore(build): update compression-webpack-plugin
chore(build): update compression-webpack-plugin (#2709)
chore(build): update compression-webpack-plugin (#2709)
chore(build): update compression-webpack-plugin (angular#2709)
chore(build): update compression-webpack-plugin (angular#2709)
angular-automatic-lock-bot commentedon Sep 6, 2019
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.
chore(build): update compression-webpack-plugin (angular#2709)