Quantcast
Channel: Node.jsタグが付けられた新着記事 - Qiita
Viewing all articles
Browse latest Browse all 8835

ERROR in [copy-webpack-plugin] unable to locate '~~/static' at '~~/static'

$
0
0

エラー状況

Node.js(Express)をHeroku実行を試みる。

細かな手順は割愛、Herokuにpushする。

$ git push heroku master

タイトルのようなビルドエラー

remote:        ERROR in [copy-webpack-plugin] unable to locate '~~~/static' at '~~~/static'
remote:        
remote:          Build failed with errors.

環境

version
Node.jsv11.15.0
Herokuheroku-20

原因

プロジェクト直下にあるstaticがない。

このstaticディレクトリ、ローカルでは見かけは空のディレクトリ。「いつの間にこんなディレクトリ作ったっけ?」なノリで、削除していた。またstaticディレクトリには隠しファイル.gitkeepがあり、消してはいけない(戒め)

対処

static.gitkeepを用意してあげる。

$ mkdir static
$ touch static/.gitkeep

Viewing all articles
Browse latest Browse all 8835

Trending Articles