@norio8 (のりお たなか)

Are you sure you want to delete the question?

If your question is resolved, you may close it.

Leaving a resolved question undeleted may help others!

We hope you find it useful!

heroku rails デプロイ エラーが起きてしまいす 誰か詳しい方は協力お願いします

解決したいこと

ruby on rails を heroku でデプロイ

例)
Ruby on Railsでherokuを使いデプロイしたいのですがどうしても以下のエラーが出てしまいます。
webpackerのインストールは行いました。

発生している問題・エラー

-----> Building on the Heroku-20 stack
-----> Using buildpacks:
       1. heroku/nodejs
       2. heroku/ruby
-----> Node.js app detected

-----> Creating runtime environment

       NPM_CONFIG_LOGLEVEL=error
       USE_YARN_CACHE=true
       NODE_VERBOSE=false
       NODE_ENV=production
       NODE_MODULES_CACHE=true

-----> Installing binaries
       engines.node (package.json):  unspecified
       engines.npm (package.json):   unspecified (use default)
       engines.yarn (package.json):  unspecified (use default)

       Resolving node version 14.x...
       Downloading and installing node 14.17.0...
       Using default npm version: 6.14.13
       Resolving yarn version 1.22.x...
       Downloading and installing yarn (1.22.10)
       Installed yarn 1.22.10

-----> Installing dependencies
       Installing node modules (yarn.lock)
       yarn install v1.22.10
       [1/4] Resolving packages...
       [2/4] Fetching packages...
       info fsevents@1.2.13: The platform "linux" is incompatible with this module.
       info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
       [3/4] Linking dependencies...
       warning " > webpack-dev-server@3.11.2" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
       warning "webpack-dev-server > webpack-dev-middleware@3.7.3" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
       [4/4] Building fresh packages...
       Done in 9.55s.

-----> Build

-----> Pruning devDependencies
       yarn install v1.22.10
       [1/4] Resolving packages...
       [2/4] Fetching packages...
       info fsevents@1.2.13: The platform "linux" is incompatible with this module.
       info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
       [3/4] Linking dependencies...
       warning " > webpack-dev-server@3.11.2" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
       warning "webpack-dev-server > webpack-dev-middleware@3.7.3" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
       [4/4] Building fresh packages...
       warning Ignored scripts due to flag.
       Done in 1.76s.

-----> Caching build
       - yarn cache

-----> Build succeeded!
 !     This app may not specify any way to start a node process
       https://devcenter.heroku.com/articles/nodejs-support#default-web-process-type
 !     Unmet dependencies don't fail yarn install but may cause runtime issues
       https://github.com/npm/npm/issues/7494
-----> Ruby app detected
-----> Installing bundler 2.2.16
-----> Removing BUNDLED WITH version in the Gemfile.lock
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.7.2
###### WARNING:
       Removing `Gemfile.lock` because it was generated on Windows.
       Bundler will do a full resolve so native gems are handled properly.
       This may result in unexpected gem versions being used in your app.
       In rare occasions Bundler may not be able to resolve your dependencies at all.

       https://devcenter.heroku.com/articles/bundler-windows-gemfile
-----> Installing dependencies using bundler 2.2.16
       Running: BUNDLE_WITHOUT='development:test' BUNDLE_PATH=vendor/bundle BUNDLE_BIN=vendor/bundle/bin bundle install -j4
       Fetching gem metadata from https://rubygems.org/.............
       Resolving dependencies......
       Fetching rake 13.0.3
       Installing rake 13.0.3
       Fetching concurrent-ruby 1.1.8
       Fetching minitest 5.14.4
       Fetching zeitwerk 2.4.2
       Fetching builder 3.2.4
       Installing zeitwerk 2.4.2
       Installing builder 3.2.4
       Installing minitest 5.14.4
       Installing concurrent-ruby 1.1.8
       Fetching erubi 1.10.0
       Fetching racc 1.5.2
       Fetching crass 1.0.6
       Installing erubi 1.10.0
       Fetching rack 2.2.3
       Installing racc 1.5.2 with native extensions
       Installing crass 1.0.6
       Installing rack 2.2.3
       Fetching nio4r 2.5.7
       Installing nio4r 2.5.7 with native extensions
       Fetching websocket-extensions 0.1.5
       Installing websocket-extensions 0.1.5
       Fetching marcel 1.0.1
       Fetching mini_mime 1.0.3
       Installing marcel 1.0.1
       Installing mini_mime 1.0.3
       Fetching msgpack 1.4.2
       Using bundler 2.2.16
       Fetching ffi 1.15.1
       Installing msgpack 1.4.2 with native extensions
       Installing ffi 1.15.1 with native extensions
       Fetching method_source 1.0.0
       Installing method_source 1.0.0
       Fetching pg 1.2.3
       Installing pg 1.2.3 with native extensions
       Fetching thor 1.1.0
       Installing thor 1.1.0
       Fetching tilt 2.0.10
       Installing tilt 2.0.10
       Fetching semantic_range 3.0.0
       Installing semantic_range 3.0.0
       Fetching turbolinks-source 5.2.0
       Installing turbolinks-source 5.2.0
       Fetching rack-test 1.1.0
       Installing rack-test 1.1.0
       Fetching rack-proxy 0.6.5
       Installing rack-proxy 0.6.5
       Fetching websocket-driver 0.7.4
       Installing websocket-driver 0.7.4 with native extensions
       Fetching i18n 1.8.10
       Installing i18n 1.8.10
       Fetching tzinfo 2.0.4
       Installing tzinfo 2.0.4
       Fetching sprockets 4.0.2
       Installing sprockets 4.0.2
       Fetching mail 2.7.1
       Installing mail 2.7.1
       Fetching puma 5.3.2
       Installing puma 5.3.2 with native extensions
       Fetching nokogiri 1.11.6 (x86_64-linux)
       Installing nokogiri 1.11.6 (x86_64-linux)
       Fetching turbolinks 5.2.1
       Installing turbolinks 5.2.1
       Fetching bootsnap 1.7.5
       Installing bootsnap 1.7.5 with native extensions
       Fetching activesupport 6.1.3.2
       Installing activesupport 6.1.3.2
       Fetching sassc 2.4.0
       Installing sassc 2.4.0 with native extensions
       Fetching loofah 2.9.1
       Installing loofah 2.9.1
       Fetching rails-dom-testing 2.0.3
       Installing rails-dom-testing 2.0.3
       Fetching globalid 0.4.2
       Installing globalid 0.4.2
       Fetching activemodel 6.1.3.2
       Installing activemodel 6.1.3.2
       Fetching jbuilder 2.11.2
       Installing jbuilder 2.11.2
       Fetching rails-html-sanitizer 1.3.0
       Installing rails-html-sanitizer 1.3.0
       Fetching activejob 6.1.3.2
       Installing activejob 6.1.3.2
       Fetching activerecord 6.1.3.2
       Installing activerecord 6.1.3.2
       Fetching actionview 6.1.3.2
       Installing actionview 6.1.3.2
       Fetching actionpack 6.1.3.2
       Installing actionpack 6.1.3.2
       Fetching actioncable 6.1.3.2
       Installing actioncable 6.1.3.2
       Fetching activestorage 6.1.3.2
       Installing activestorage 6.1.3.2
       Fetching actionmailer 6.1.3.2
       Installing actionmailer 6.1.3.2
       Fetching railties 6.1.3.2
       Installing railties 6.1.3.2
       Fetching sprockets-rails 3.2.2
       Installing sprockets-rails 3.2.2
       Fetching actionmailbox 6.1.3.2
       Installing actionmailbox 6.1.3.2
       Fetching actiontext 6.1.3.2
       Installing actiontext 6.1.3.2
       Fetching webpacker 5.4.0
       Installing webpacker 5.4.0
       Fetching rails 6.1.3.2
       Installing rails 6.1.3.2
       Fetching sassc-rails 2.1.2
       Installing sassc-rails 2.1.2
       Fetching sass-rails 6.0.0
       Installing sass-rails 6.0.0
       Bundle complete! 16 Gemfile dependencies, 56 gems now installed.
       Gems in the groups 'development' and 'test' were not installed.
       Bundled gems are installed into `./vendor/bundle`
       Bundle completed (265.04s)
       Cleaning up the bundler cache.
-----> Detecting rake tasks
-----> Preparing app for Rails asset pipeline
       Running: rake assets:precompile
       yarn install v1.22.10
       [1/4] Resolving packages...
       [2/4] Fetching packages...
       info fsevents@1.2.13: The platform "linux" is incompatible with this module.
       info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
       [3/4] Linking dependencies...
       warning " > webpack-dev-server@3.11.2" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
       warning "webpack-dev-server > webpack-dev-middleware@3.7.3" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
       [4/4] Building fresh packages...
       Done in 7.29s.
       I, [2021-05-27T10:35:07.112426 #2775]  INFO -- : Writing /tmp/build_8a21ace1/public/assets/manifest-b4bf6e57a53c2bdb55b8998cc94cd00883793c1c37c5e5aea3ef6749b4f6d92b.js
       I, [2021-05-27T10:35:07.112777 #2775]  INFO -- : Writing /tmp/build_8a21ace1/public/assets/manifest-b4bf6e57a53c2bdb55b8998cc94cd00883793c1c37c5e5aea3ef6749b4f6d92b.js.gz
       I, [2021-05-27T10:35:07.113035 #2775]  INFO -- : Writing /tmp/build_8a21ace1/public/assets/application-04c3ae28f07e1bf734223bf526d0cdd296440ef53bcb3f80b9f093c6bf02f747.css
       I, [2021-05-27T10:35:07.113208 #2775]  INFO -- : Writing /tmp/build_8a21ace1/public/assets/application-04c3ae28f07e1bf734223bf526d0cdd296440ef53bcb3f80b9f093c6bf02f747.css.gz
       I, [2021-05-27T10:35:07.113442 #2775]  INFO -- : Writing /tmp/build_8a21ace1/public/assets/scaffolds-04c3ae28f07e1bf734223bf526d0cdd296440ef53bcb3f80b9f093c6bf02f747.css
       I, [2021-05-27T10:35:07.113650 #2775]  INFO -- : Writing /tmp/build_8a21ace1/public/assets/scaffolds-04c3ae28f07e1bf734223bf526d0cdd296440ef53bcb3f80b9f093c6bf02f747.css.gz
       I, [2021-05-27T10:35:07.113880 #2775]  INFO -- : Writing /tmp/build_8a21ace1/public/assets/users-04024382391bb910584145d8113cf35ef376b55d125bb4516cebeb14ce788597.css
       I, [2021-05-27T10:35:07.114039 #2775]  INFO -- : Writing /tmp/build_8a21ace1/public/assets/users-04024382391bb910584145d8113cf35ef376b55d125bb4516cebeb14ce788597.css.gz
       Compiling...
       Compilation failed:
       yarn run v1.22.10
       info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.


       error Command "webpack" not found.

 !
 !     Precompiling assets failed.
 !
 !     Push rejected, failed to compile Ruby app.
 !     Push failed

エラー箇所

  error Command "webpack" not found.
 Precompiling assets failed.

自分で試したこと

urlを開いてもHeroku | Welcome to your new app!が出るだけで内容を見れません。
webpackerはインストールできていると思うのですが...
githubと連携させています。

0 likes

No Answers yet.

Your answer might help someone💌