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

gh-pages -d buildが出来ない(キレそう)

Last updated at Posted at 2019-08-06

#キレそう(キレた)

github pagesで作業中のReactプロジェクトを動かしてみるか〜と思い早速色々整えて以下のコマンドを実行した.

terminal.
gh-pages -d build

すると以下のようなエラーが出てしまった.

terminal.
The "file" argument must be of type string. Received type undefined

解決法

どうやらgithub-pagesのバージョン2.1系で出るエラーのよう(すぐ修正されそう).
stack overflowにて同様の記述を発見しました.

以下のようにオプションをつけて実行するか

terminal.
gh-pages -d build --git git

以下のように作業をして

-Delete node_modules
-Delete package-lock file
-In package.json -> dependencies -> delete gh-pages line

以下のコマンドを実行するといいみたい.

terminal.
run npm i gh-pages@2.0.1
run npm i

まとめ

割と大きめのバグの気がしますが,なぜリリースが通ったんだろう...?

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?