1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Phoenix.new でエラーが発生する

1
Posted at

会社の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 でプロジェクトを作ると、うまくいきました。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?