{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular-cli/issues/1696","repository_url":"https://api.github.com/repos/angular/angular-cli","labels_url":"https://api.github.com/repos/angular/angular-cli/issues/1696/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular-cli/issues/1696/comments","events_url":"https://api.github.com/repos/angular/angular-cli/issues/1696/events","html_url":"https://github.com/angular/angular-cli/issues/1696","id":171149123,"number":1696,"title":"3rd Party Library Installation with webpack","user":{"login":"carlosfaria94","id":4710889,"avatar_url":"https://avatars.githubusercontent.com/u/4710889?v=3","gravatar_id":"","url":"https://api.github.com/users/carlosfaria94","html_url":"https://github.com/carlosfaria94","followers_url":"https://api.github.com/users/carlosfaria94/followers","following_url":"https://api.github.com/users/carlosfaria94/following{/other_user}","gists_url":"https://api.github.com/users/carlosfaria94/gists{/gist_id}","starred_url":"https://api.github.com/users/carlosfaria94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carlosfaria94/subscriptions","organizations_url":"https://api.github.com/users/carlosfaria94/orgs","repos_url":"https://api.github.com/users/carlosfaria94/repos","events_url":"https://api.github.com/users/carlosfaria94/events{/privacy}","received_events_url":"https://api.github.com/users/carlosfaria94/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular/angular-cli/labels/command:%20build","name":"command: build","color":"c7def8"},{"url":"https://api.github.com/repos/angular/angular-cli/labels/feature:%20webpack","name":"feature: webpack","color":"fef2c0"},{"url":"https://api.github.com/repos/angular/angular-cli/labels/priority:%202%20(required)","name":"priority: 2 (required)","color":"0052cc"},{"url":"https://api.github.com/repos/angular/angular-cli/labels/type:%20bug","name":"type: bug","color":"EEEEEE"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-08-15T10:54:29Z","updated_at":"2016-08-20T19:33:31Z","closed_at":null,"body":"Hi, I'm trying to install a 3rd party library, generated with browsify (https://github.com/bitpay/bitcore-wallet-client), works well with Angular 1 in production.\r\n\r\nBut now trying to install with webpack, and fail.\r\n\r\n```\r\nangular-cli: 1.0.0-beta.11-webpack.2\r\nnode: 4.4.7\r\nos: darwin x64 (Mac OSX El Capitan)\r\n```\r\n\r\nI'm doing this in a component, for example: \r\n\r\n```\r\nimport * as Client from 'bitcore-wallet-client';\r\n\r\n...\r\n\r\nngOnInit() {\r\n    var bwc = new Client({\r\n      baseUrl: 'https://bws.bitpay.com/bws/api',\r\n      verbose: true\r\n    });\r\n}\r\n```\r\nThe problem is with **request** (https://github.com/request/request/issues/1529) library used.\r\n\r\nThe log:\r\n\r\n```\r\nERROR in ./~/forever-agent/index.js\r\nModule not found: Error: Can't resolve 'net' in '/node_modules/forever-agent'\r\n @ ./~/forever-agent/index.js 6:10-24\r\n @ ./~/request/request.js\r\n @ ./~/request/index.js\r\n @ ./~/bitcore-wallet-client/lib/api.js\r\n @ ./~/bitcore-wallet-client/lib/index.js\r\n @ ./~/bitcore-wallet-client/index.js\r\n @ ./src/app/wallet/import/import.component.ts\r\n @ ./src/app/app.module.ts\r\n @ ./src/app/index.ts\r\n @ ./src/main.ts\r\n @ multi main\r\n\r\nERROR in ./~/forever-agent/index.js\r\nModule not found: Error: Can't resolve 'tls' in '/node_modules/forever-agent'\r\n @ ./~/forever-agent/index.js 7:10-24\r\n @ ./~/request/request.js\r\n @ ./~/request/index.js\r\n @ ./~/bitcore-wallet-client/lib/api.js\r\n @ ./~/bitcore-wallet-client/lib/index.js\r\n @ ./~/bitcore-wallet-client/index.js\r\n @ ./src/app/wallet/import/import.component.ts\r\n @ ./src/app/app.module.ts\r\n @ ./src/app/index.ts\r\n @ ./src/main.ts\r\n @ multi main\r\n\r\nERROR in ./~/tough-cookie/lib/cookie.js\r\nModule not found: Error: Can't resolve 'net' in '/node_modules/tough-cookie/lib'\r\n @ ./~/tough-cookie/lib/cookie.js 32:10-24\r\n @ ./~/request/lib/cookies.js\r\n @ ./~/request/index.js\r\n @ ./~/bitcore-wallet-client/lib/api.js\r\n @ ./~/bitcore-wallet-client/lib/index.js\r\n @ ./~/bitcore-wallet-client/index.js\r\n @ ./src/app/wallet/import/import.component.ts\r\n @ ./src/app/app.module.ts\r\n @ ./src/app/index.ts\r\n @ ./src/main.ts\r\n @ multi main\r\n\r\nERROR in ./~/tunnel-agent/index.js\r\nModule not found: Error: Can't resolve 'net' in '/node_modules/tunnel-agent'\r\n @ ./~/tunnel-agent/index.js 3:10-24\r\n @ ./~/request/lib/tunnel.js\r\n @ ./~/request/request.js\r\n @ ./~/request/index.js\r\n @ ./~/bitcore-wallet-client/lib/api.js\r\n @ ./~/bitcore-wallet-client/lib/index.js\r\n @ ./~/bitcore-wallet-client/index.js\r\n @ ./src/app/wallet/import/import.component.ts\r\n @ ./src/app/app.module.ts\r\n @ ./src/app/index.ts\r\n @ ./src/main.ts\r\n @ multi main\r\n\r\nERROR in ./~/tunnel-agent/index.js\r\nModule not found: Error: Can't resolve 'tls' in '/node_modules/tunnel-agent'\r\n @ ./~/tunnel-agent/index.js 4:10-24\r\n @ ./~/request/lib/tunnel.js\r\n @ ./~/request/request.js\r\n @ ./~/request/index.js\r\n @ ./~/bitcore-wallet-client/lib/api.js\r\n @ ./~/bitcore-wallet-client/lib/index.js\r\n @ ./~/bitcore-wallet-client/index.js\r\n @ ./src/app/wallet/import/import.component.ts\r\n @ ./src/app/app.module.ts\r\n @ ./src/app/index.ts\r\n @ ./src/main.ts\r\n @ multi main\r\n\r\nERROR in [default] /src/app/wallet/import/import.component.ts:5:24 \r\nCannot find module 'bitcore-wallet-client'.\r\n```\r\n\r\nSo, adding a webpack-config.js in https://github.com/bitpay/bitcore-wallet-client will solve the problem? Or we need to add this... \r\n```\r\n    net: 'empty',\r\n    tls: 'empty'\r\n```\r\n in angular-cli webpack config file? Like we done here (https://github.com/angular/angular-cli/pull/1599) with `fs` ?\r\n\r\nThanks."},"comment":{"url":"https://api.github.com/repos/angular/angular-cli/issues/comments/241219283","html_url":"https://github.com/angular/angular-cli/issues/1696#issuecomment-241219283","issue_url":"https://api.github.com/repos/angular/angular-cli/issues/1696","id":241219283,"user":{"login":"chiefmc","id":8651665,"avatar_url":"https://avatars.githubusercontent.com/u/8651665?v=3","gravatar_id":"","url":"https://api.github.com/users/chiefmc","html_url":"https://github.com/chiefmc","followers_url":"https://api.github.com/users/chiefmc/followers","following_url":"https://api.github.com/users/chiefmc/following{/other_user}","gists_url":"https://api.github.com/users/chiefmc/gists{/gist_id}","starred_url":"https://api.github.com/users/chiefmc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chiefmc/subscriptions","organizations_url":"https://api.github.com/users/chiefmc/orgs","repos_url":"https://api.github.com/users/chiefmc/repos","events_url":"https://api.github.com/users/chiefmc/events{/privacy}","received_events_url":"https://api.github.com/users/chiefmc/received_events","type":"User","site_admin":false},"created_at":"2016-08-20T19:33:31Z","updated_at":"2016-08-20T19:33:31Z","body":"update: the only way I've manage to sort it is to directly edit the Webpack common config file in `node_modules` which is a no-go way. \r\nIs there a chance to give us a tool making it the proper way?\r\n\r\nThanks."}}
{"actor":{"display_login":"chiefmc"}}