LoginSignup
2
0

More than 5 years have passed since last update.

Haskell Stackでエラー「Failed to download template new-template: to create project ...」の対処法

Last updated at Posted at 2017-08-23

stackのバージョン

$ stack --version
Version 1.5.1, Git revision 600c1f01435a10d127938709556c1682ecfd694e (4861 commits) x86_64 hpack-0.17.1

エラーの発生状況

stack new hogehogeすると、Failed to download template new-template...というエラーがでる。

$ stack new hogehoge
Downloading template "new-template" to create project "hogehoge" in hogehoge/ ...
Failed to download template new-template: unknown reason, status code was: 500

何回もやるとstatusコードは500番台の他のコードもでました。

解決方法

# テンプレートのファイルがあるリポジトリをクローンする
$ git clone https://github.com/commercialhaskell/stack-templates.git
# クローンしたリポジトリのファイルをテンプレートして指定して、stack newする
$ stack new hogehoge ./stack-templates/new-template.hsfiles 

templateをダウンロードで落ちるようなので、
テンプレートファイルを明示的に指定して、作成してみました。

発生時間

2017/08/23 22:20頃

考えられる原因

ちょうど現在、https://raw.githubusercontent.com/ が落ちていて、stackがGithub rawからダウンロードしているかは、知りませんが、ちょうど落ちていますし、stackのデフォルトのテンプレートをGithubで管理している感じなので、もしかすると原因かもしれません。

Screen Shot 2017-08-23 at 10.35.05 pm.png

参考にしたところ

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