LoginSignup
0
1

More than 3 years have passed since last update.

create-next-appでテンプレートのダウンロードが止まる場合の対応策

Last updated at Posted at 2021-04-25

問題

create-next-appで以下のコマンドを実行した時、環境によってはコマンドの実行が進まず、プロジェクトが生成されないことがあった。
おそらく原因はProxy設定によってテンプレートのダウンロードが阻まれているため。

npx create-next-app --example with-typescript nextexp

これに対応する。

解決策

create-next-appのテンプレートは--exampleに入力するのと全く同じ名前でnext.jsのgithubのmasterブランチのexamplesに入っているので、それをダウンロードしてくればよい。

今回のコマンドで言えば具体的にはここ。

vercel/next.js/tree/master/examples/with-typescript

コマンドの実行が進まない原因自体はProxy設定によってテンプレートのダウンロードが阻まれているからだと考えられるが、最初に一回ダウンロードするだけのものなのでこれでよしとした。

以上

0
1
1

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
0
1