error Command "webpack" not found.のエラー
herokuにデプロイしようとすると「error Command "webpack" not found.」エラーが発生してしまいます。
初心者であるため、解決策が不明となっております。
いろいろ調べて下記のコードを実行しました。
$ brew upgrade yarn
$ bundle exec rails webpacker:install
$ bin/webpack-dev-server
しかし結果は同じでした。
どのように対応すると良いでしょうか?
具体的な状況を説明できず申し訳ありませんが、何卒よろしくお願い致します。
エラーコンソール⬇︎
remote: [2/4] Fetching packages... remote: info fsevents@1.2.13: The platform "linux" is incompatible with this module. remote: info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation. remote: [3/4] Linking dependencies... remote: warning " > webpack-dev-server@3.11.2" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0". remote: warning "webpack-dev-server > webpack-dev-middleware@3.7.3" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0". remote: [4/4] Building fresh packages... remote: Done in 6.07s. remote: I, [2021-04-15T01:37:34.537869 #1418] INFO -- : Writing ~ 省略 ~ remote: Compiling... remote: Compilation failed: remote: yarn run v1.22.4 remote: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. remote: remote: remote: error Command "webpack" not found. remote: remote: remote: ! remote: ! Precompiling assets failed. remote: ! remote: ! Push rejected, failed to compile Ruby app. remote: remote: ! Push failed remote: Verifying deploy... remote: remote: ! Push rejected to webtoolshop. remote: To https://git.heroku.com/webtoolshop.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/webtoolshop.git'
あなたの回答
tips
プレビュー