前提・実現したいこと
Railsでwebサービスを作成しています。
git push herokuが成功しません。
webpack not installed
が出ているので、指示に従ってnpm install --save-dev webpack
を実行しましたが、同じエラーが出てしまい改善しません。
rails webpacker:installも試しましたがダメでした。
どうすればこのエラーを解決できるか教えていただきたいです。
程度の低い質問でしたら申し訳ございません。
また、質問に必要な情報等に不足があれば、お手数ですがご指摘いただければ、追記いたします。
よろしくお願いいたします。
エラーコード
[terminal] $ git push heroku Counting objects: 171, done. Compressing objects: 100% (161/161), done. Writing objects: 100% (171/171), 3.87 MiB | 6.51 MiB/s, done. Total 171 (delta 91), reused 0 (delta 0) remote: Compressing source files... done. remote: Building source: remote: remote: -----> Building on the Heroku-20 stack remote: -----> Using buildpack: heroku/ruby remote: -----> Ruby app detected remote: -----> Installing bundler 1.17.3 remote: -----> Removing BUNDLED WITH version in the Gemfile.lock remote: -----> Compiling Ruby/Rails remote: -----> Using Ruby version: ruby-2.6.6 remote: -----> Installing dependencies using bundler 1.17.3 remote: Running: BUNDLE_WITHOUT='development:test' BUNDLE_PATH=vendor/bundle BUNDLE_BIN=vendor/bundle/bin BUNDLE_DEPLOYMENT=1 BUNDLE_GLOBAL_PATH_APPENDS_RUBY_SCOPE=1 bundle install -j4 remote: Fetching gem metadata from https://rubygems.org/............ remote: Using rake 12.3.3 remote: Using concurrent-ruby 1.1.9 remote: Using minitest 5.11.3 remote: Using thread_safe 0.3.6 remote: Using zeitwerk 2.4.2 remote: Using builder 3.2.4 remote: Using erubi 1.10.0 remote: Using mini_portile2 2.5.3 remote: Using racc 1.5.2 remote: Using crass 1.0.6 remote: Using rack 2.2.3 remote: Using nio4r 2.5.7 remote: Using websocket-extensions 0.1.5 remote: Using mini_mime 1.1.0 remote: Using public_suffix 4.0.6 remote: Using execjs 2.8.1 remote: Using bcrypt 3.1.13 remote: Using msgpack 1.4.2 remote: Using ffi 1.15.1 remote: Using bundler 1.17.3 remote: Using mini_magick 4.9.5 remote: Using ssrf_filter 1.0.7 remote: Using method_source 1.0.0 remote: Using pg 1.1.4 remote: Using thor 1.1.0 remote: Using rb-fsevent 0.11.0 remote: Using tilt 2.0.10 remote: Using turbolinks-source 5.2.0 remote: Using i18n 1.8.10 remote: Using tzinfo 1.2.9 remote: Using nokogiri 1.11.7 (x86_64-linux) remote: Using rack-test 1.1.0 remote: Using websocket-driver 0.7.4 remote: Using mail 2.7.1 remote: Using addressable 2.7.0 remote: Using autoprefixer-rails 10.2.5.1 remote: Using bootsnap 1.4.5 remote: Using sassc 2.4.0 remote: Using ruby-vips 2.1.2 remote: Using puma 4.3.6 remote: Using rack-proxy 0.7.0 remote: Using sprockets 3.7.2 remote: Using rb-inotify 0.10.1 remote: Using turbolinks 5.2.0 remote: Using activesupport 6.0.3 remote: Using bootstrap-sass 3.4.1 remote: Using image_processing 1.9.3 remote: Fetching font-awesome-sass 5.15.1 remote: Using rails-dom-testing 2.0.3 remote: Using loofah 2.10.0 remote: Using globalid 0.4.2 remote: Using activemodel 6.0.3 remote: Using mimemagic 0.3.10 remote: Using jbuilder 2.9.1 remote: Using sass-listen 4.0.0 remote: Using rails-html-sanitizer 1.3.0 remote: Using activejob 6.0.3 remote: Using activerecord 6.0.3 remote: Using marcel 0.3.3 remote: Using carrierwave 2.2.0 remote: Using sass 3.7.4 remote: Using actionview 6.0.3 remote: Using actionpack 6.0.3 remote: Using actioncable 6.0.3 remote: Using activestorage 6.0.3 remote: Using actionmailer 6.0.3 remote: Using railties 6.0.3 remote: Using sprockets-rails 3.2.2 remote: Using actionmailbox 6.0.3 remote: Using actiontext 6.0.3 remote: Using rails 6.0.3 remote: Using sass-rails 5.1.0 remote: Using webpacker 4.0.7 remote: Installing font-awesome-sass 5.15.1 remote: Bundle complete! 28 Gemfile dependencies, 73 gems now installed. remote: Gems in the groups development and test were not installed. remote: Bundled gems are installed into `./vendor/bundle` remote: Bundle completed (4.93s) remote: Cleaning up the bundler cache. remote: -----> Installing node-v12.16.2-linux-x64 remote: -----> Installing yarn-v1.22.4 remote: -----> Detecting rake tasks remote: -----> Preparing app for Rails asset pipeline remote: Running: rake assets:precompile remote: yarn install v1.22.4 remote: warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json. remote: [1/4] Resolving packages... remote: [2/4] Fetching packages... remote: info fsevents@2.3.2: The platform "linux" is incompatible with this module. remote: info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation. 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: [4/4] Building fresh packages... remote: Done in 27.83s. . . . . . remote: Compiling… remote: Compilation failed: remote: remote: webpack not installed remote: remote: Install webpack to start bundling: remote: $ npm install --save-dev webpack remote: remote: remote: remote: remote: ! remote: ! Precompiling assets failed. remote: ! remote: ! Push rejected, failed to compile Ruby app. remote: remote: ! Push failed remote: ! remote: ! ## Warning - The same version of this code has already been built: ac74576cd95b8eff3326ec08548b5984f49980e6 remote: ! remote: ! We have detected that you have triggered a build from source code with version ac74576cd95b8eff3326ec08548b5984f49980e6 remote: ! at least twice. One common cause of this behavior is attempting to deploy code from a different branch. remote: ! remote: ! If you are developing on a branch and deploying via git you must run: remote: ! remote: ! git push heroku <branchname>:main remote: ! remote: ! This article goes into details on the behavior: remote: ! https://devcenter.heroku.com/articles/duplicate-build-version remote: remote: Verifying deploy... remote: remote: ! Push rejected to damp-hollows-85957. remote: To https://git.heroku.com/damp-hollows-86959.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/damp-hollows-86948.git' (ドメイン名は隠蔽のため変えてあります)
補足情報(FW/ツールのバージョンなど)
Rails 6.0.3
Ruby 2.6.3
AWS Cloud9を使用
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2021/06/15 06:37