When building the Docker image releng/npm on contint1001, the npm upgrade fails:
"/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "npm@3.8.3" TypeError: Request path contains unescaped characters at new ClientRequest (_http_client.js:52:11) at TunnelingAgent.exports.request (http.js:31:10) at TunnelingAgent.createSocket (/usr/lib/nodejs/tunnel-agent/index.js:117:25)
We use the npm 1.4.21 package from Jessie which uses a broken node module tunnelling-agent. That fails when using a http proxy, apparently due to a change in NodeJS API.
Reference:
https://bugs.debian.org/801897 (has the nodejs and module patches)
The issue got fixed in April 2014 via: https://github.com/request/tunnel-agent/pull/8
Probably we could try patching https://packages.debian.org/jessie/node-tunnel-agent and see whether that solves the issue. The deb package is only used to upgrade to npm@3.8.3
How to reproduce
On a Jessie instance, install npm and a http proxy then try to install a single module via npm:
$ sudo apt install npm polipo $ http_proxy=127.0.0.1:8123 npm install exit npm ERR! TypeError: Request path contains unescaped characters ...