会社のPCにもElixir+PhoenixFramework環境作ろうとしたところ、
Phoenix.new コマンドで新しいプロジェクト作成するときにエラーが発生した。
> mix phoenix.new hello_phoenix
- creating hello_phoenix/config/config.exs
- creating hello_phoenix/config/dev.exs
- creating hello_phoenix/config/prod.exs
...
Fetch and install dependencies? [Yn] y - running npm install && node node_modules/brunch/bin/brunch build
- running mix deps.get
npm http GET https://registry.npmjs.org/clean-css-brunch
npm ERR! TypeError: Request path contains unescaped characters.
npm ERR! at new ClientRequest (_http_client.js:73:11)
npm ERR! at TunnelingAgent.exports.request (http.js:49:10)
...
npmでパッケージを取得しようとしてるところでエラーになっているようで、
同様のメッセージでググってみたところ、どうやら弊社のプロキシサーバーが原因っぽい
httpsプロトコルのままではうまくいきそうにないので、プロトコルを変更する。
>npm config set registry http://registry.npmjs.org/
再度、Phoenix.new でプロジェクトを作ると、うまくいきました。