I'm having trouble with installing addons through ember-cli.
I tried to install the addon ember-cli-pace.
Due to the restrictions of my company i am forced to use a private bower cache with proxy
However ember install ember-cli-pace generates the following output:
ember install ember-cli-pace [15:20:14]
(node:16657) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
WARNING: WARNING: Node v6.0.0 has currently not been tested against Ember CLI and may result in unexpected behaviour.
Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
Installed packages for tooling via npm.
installing pace
install bower package pace
Request to https://bower.herokuapp.com/packages/pace failed: getaddrinfo ENOTFOUND bower.herokuapp.com bower.herokuapp.com:443
Error: Request to https://bower.herokuapp.com/packages/pace failed: getaddrinfo ENOTFOUND bower.herokuapp.com bower.herokuapp.com:443
at createError (/home/maurice/workspace/secretStuf/node_modules/bower/lib/node_modules/bower-registry-client/lib/util/createError.js:2:15)
at Request._callback (/home/maurice/workspace/secretStuf/node_modules/bower/lib/node_modules/bower-registry-client/lib/lookup.js:97:29)
at self.callback (/home/maurice/workspace/secretStuf/node_modules/bower/lib/node_modules/request/request.js:198:22)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
at Request.request.emit (/home/maurice/workspace/secretStuf/node_modules/bower/lib/node_modules/request-replay/index.js:69:33)
at Request.onRequestError (/home/maurice/workspace/secretStuf/node_modules/bower/lib/node_modules/request/request.js:820:8)
at emitOne (events.js:96:13)
at ClientRequest.emit (events.js:188:7)
at TLSSocket.socketErrorListener (_http_client.js:306:9)
Using bower manually (bower install pace) works fine. But it doesn't solve my problem as ember-cli wants to install it anyway.
bower i pace --save --verbose
bower pace#* not-cached git://mirror.secret.xxx:6789/pace#*
bower pace#* resolve git://mirror.secret.xxx:6789/pace#*
bower pace#* checkout v1.0.2
bower pace#* invalid-meta The "name" is recommended to be lowercase, can contain digits, dots, dashes
bower pace#* resolved git://mirror.secret.xxx:6789/pace#1.0.2
The proxy in bower is set through the .bowerrc file which is located in the project root folder.
The "proxy" is just a private registry which act as an proxy.
cat .bowerrc
{
"directory": "bower_components",
"analytics": false,
"registry": "http://mirror.secret.xxx:5678"
}
Is there any config I missed?
Output from ember version --verbose:
ember version --verbose
(node:12494) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
WARNING: WARNING: Node v6.0.0 has currently not been tested against Ember CLI and may result in unexpected behaviour.
Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
ember-cli: 2.5.0
http_parser: 2.7.0
node: 6.0.0
v8: 5.0.71.35
uv: 1.9.0
zlib: 1.2.8
ares: 1.10.1-DEV
modules: 48
openssl: 1.0.2g
os: linux x64
adding a log to bower-install.js
console.log("%o", config);
result in:
{ directory: 'bower_components',
registry:
{ default: 'https://bower.herokuapp.com',
search: [ 'https://bower.herokuapp.com' ],
register: 'https://bower.herokuapp.com',
publish: 'https://bower.herokuapp.com' },
shorthandResolver: 'https://github.com/{{owner}}/{{package}}.git',
tmp: '/tmp/maurice/bower',
timeout: 30000,
ca: { search: [] },
strictSsl: true,
userAgent: 'node/v6.0.0 linux x64',
color: true,
storage:
{ packages: '/home/maurice/.cache/bower/packages',
links: '/home/maurice/.local/share/bower/links',
completion: '/home/maurice/.local/share/bower/completion',
registry: '/home/maurice/.cache/bower/registry',
empty: '/home/maurice/.local/share/bower/empty' },
interactive: true }
@mohlek that indeed looks like a bug to me. do you want to take a look into solving this? I think once the actual bug is identified it should be reasonably easy to fix.
This patch fixes the problem for me. It requires some more testing as I can only speak for myself and that great proxy setup in my company.
If anybody else stumbles upon this issue, you can copy your .bowerrc to your home directory as a temporary workaround.
The problem here is that we don't roll up .bowerrc files into our programmatic invocation of bower. This is definitely a bug if anybody would like to take a crack at bringing it home in #5892.
Most helpful comment
@mohlek that indeed looks like a bug to me. do you want to take a look into solving this? I think once the actual bug is identified it should be reasonably easy to fix.