kodamarisa / osinotameni_yasetai

0 stars 0 forks source link

デプロイでのエラー #14

Closed kodamarisa closed 6 months ago

kodamarisa commented 6 months ago
- どの処理までうまく動いているのか

- 該当のソースコード
package.json

{ "name": "osinotameni-yasetai", "private": true, "dependencies": { "@babel/plugin-proposal-private-property-in-object": "^7.21.11", "@rails/actioncable": "^6.0.0", "@rails/activestorage": "^6.0.0", "@rails/ujs": "^6.0.0", "@rails/webpacker": "5.4.4", "turbolinks": "^5.2.0", "webpack": "^4.46.0", "webpack-cli": "^3.3.12" }, "version": "0.1.0", "devDependencies": { "@babel/plugin-proposal-private-methods": "^7.18.6", "webpack-dev-server": "^3" } }

kodamarisa@kodamarisanoMacBook-Pro osinotameni_yasetai % node -v v15.14.0 kodamarisa@kodamarisanoMacBook-Pro osinotameni_yasetai % rails -v Rails 6.1.7.7 kodamarisa@kodamarisanoMacBook-Pro osinotameni_yasetai % ruby -v ruby 3.1.4p223 (2023-03-30 revision 957bb7cb81) [arm64-darwin23] kodamarisa@kodamarisanoMacBook-Pro osinotameni_yasetai % yarn -v 1.22.21 kodamarisa@kodamarisanoMacBook-Pro osinotameni_yasetai % which node /Users/kodamarisa/.nodenv/shims/node bin/rails assets:precompile RAILS_ENV=production yarn install v1.22.21 [1/4] 🔍 Resolving packages... [2/4] 🚚 Fetching packages... [3/4] 🔗 Linking dependencies... warning " > @babel/plugin-proposal-private-property-in-object@7.21.11" has unmet peer dependency "@babel/core@^7.0.0-0". warning "@babel/plugin-proposal-private-property-in-object > @babel/helper-create-class-features-plugin@7.24.5" has unmet peer dependency "@babel/core@^7.0.0". warning "@babel/plugin-proposal-private-property-in-object > @babel/plugin-syntax-private-property-in-object@7.14.5" has unmet peer dependency "@babel/core@^7.0.0-0". warning "@babel/plugin-proposal-private-property-in-object > @babel/helper-create-class-features-plugin > @babel/helper-replace-supers@7.24.1" has unmet peer dependency "@babel/core@^7.0.0". warning " > @babel/plugin-proposal-private-methods@7.18.6" has unmet peer dependency "@babel/core@^7.0.0-0". [4/4] 🔨 Building fresh packages... ✨ Done in 1.18s. I, [2024-05-14T11:31:51.995592 #3271] INFO -- : Writing /Users/kodamarisa/portfolio/osinotameni_yasetai/public/assets/manifest-b4bf6e57a53c2bdb55b8998cc94cd00883793c1c37c5e5aea3ef6749b4f6d92b.js I, [2024-05-14T11:31:51.995740 #3271] INFO -- : Writing /Users/kodamarisa/portfolio/osinotameni_yasetai/public/assets/manifest-b4bf6e57a53c2bdb55b8998cc94cd00883793c1c37c5e5aea3ef6749b4f6d92b.js.gz I, [2024-05-14T11:31:51.995813 #3271] INFO -- : Writing /Users/kodamarisa/portfolio/osinotameni_yasetai/public/assets/application-04c3ae28f07e1bf734223bf526d0cdd296440ef53bcb3f80b9f093c6bf02f747.css I, [2024-05-14T11:31:51.995901 #3271] INFO -- : Writing /Users/kodamarisa/portfolio/osinotameni_yasetai/public/assets/application-04c3ae28f07e1bf734223bf526d0cdd296440ef53bcb3f80b9f093c6bf02f747.css.gz I, [2024-05-14T11:31:51.996025 #3271] INFO -- : Writing /Users/kodamarisa/portfolio/osinotameni_yasetai/public/assets/boards-04024382391bb910584145d8113cf35ef376b55d125bb4516cebeb14ce788597.css I, [2024-05-14T11:31:51.996148 #3271] INFO -- : Writing /Users/kodamarisa/portfolio/osinotameni_yasetai/public/assets/boards-04024382391bb910584145d8113cf35ef376b55d125bb4516cebeb14ce788597.css.gz I, [2024-05-14T11:31:51.996233 #3271] INFO -- : Writing /Users/kodamarisa/portfolio/osinotameni_yasetai/public/assets/scaffolds-04c3ae28f07e1bf734223bf526d0cdd296440ef53bcb3f80b9f093c6bf02f747.css I, [2024-05-14T11:31:51.996341 #3271] INFO -- : Writing /Users/kodamarisa/portfolio/osinotameni_yasetai/public/assets/scaffolds-04c3ae28f07e1bf734223bf526d0cdd296440ef53bcb3f80b9f093c6bf02f747.css.gz Warning: you are using an unstable release of Node.js (v15.14.0). If you encounter issues with Node.js, consider switching to an Active LTS release. More info: https://docs.npmjs.com/try-the-latest-stable-version-of-node Compiling... Compilation failed: Hash: 2c12928ffdf50d16ce21 Version: webpack 4.47.0 Time: 276ms Built at: 2024/05/14 11:31:53 2 assets Entrypoint application = js/application-ed3c104d977deadfc88e.js js/application-ed3c104d977deadfc88e.js.map [0] ./app/javascript/packs/application.js 5.03 KiB {0} [built] [failed] [1 error]

ERROR in ./app/javascript/packs/application.js Module build failed (from ./node_modules/babel-loader/lib/index.js): Error: Cannot find package '@babel/plugin-proposal-private-methods' imported from /Users/kodamarisa/portfolio/osinotameni_yasetai/babel-virtual-resolve-base.js at new NodeError (/Users/kodamarisa/portfolio/osinotameni_yasetai/node_modules/@babel/core/lib/vendor/import-meta-resolve.js:194:5) at packageResolve (/Users/kodamarisa/portfolio/osinotameni_yasetai/node_modules/@babel/core/lib/vendor/import-meta-resolve.js:908:9) at moduleResolve (/Users/kodamarisa/portfolio/osinotameni_yasetai/node_modules/@babel/core/lib/vendor/import-meta-resolve.js:937:20) at defaultResolve (/Users/kodamarisa/portfolio/osinotameni_yasetai/node_modules/@babel/core/lib/vendor/import-meta-resolve.js:1007:15) at resolve (/Users/kodamarisa/portfolio/osinotameni_yasetai/node_modules/@babel/core/lib/vendor/import-meta-resolve.js:1020:12) at tryImportMetaResolve (/Users/kodamarisa/portfolio/osinotameni_yasetai/node_modules/@babel/core/lib/config/files/plugins.js:142:45) at resolveStandardizedNameForImport (/Users/kodamarisa/portfolio/osinotameni_yasetai/node_modules/@babel/core/lib/config/files/plugins.js:164:19) at resolveStandardizedName (/Users/kodamarisa/portfolio/osinotameni_yasetai/node_modules/@babel/core/lib/config/files/plugins.js:173:22) at loadPlugin (/Users/kodamarisa/portfolio/osinotameni_yasetai/node_modules/@babel/core/lib/config/files/plugins.js:52:20) at loadPlugin.next () at createDescriptor (/Users/kodamarisa/portfolio/osinotameni_yasetai/node_modules/@babel/core/lib/config/config-descriptors.js:140:16) at createDescriptor.next () at step (/Users/kodamarisa/portfolio/osinotameni_yasetai/node_modules/gensync/index.js:261:32) at evaluateAsync (/Users/kodamarisa/portfolio/osinotameni_yasetai/node_modules/gensync/index.js:291:5) at /Users/kodamarisa/portfolio/osinotameni_yasetai/node_modules/gensync/index.js:44:11 at Array.forEach () at Function.async (/Users/kodamarisa/portfolio/osinotameni_yasetai/node_modules/gensync/index.js:43:15) at Function.all (/Users/kodamarisa/portfolio/osinotameni_yasetai/node_modules/gensync/index.js:216:13) at Generator.next () at createDescriptors (/Users/kodamarisa/portfolio/osinotameni_yasetai/node_modules/@babel/core/lib/config/config-descriptors.js:102:41) at createDescriptors.next () at createPluginDescriptors (/Users/kodamarisa/portfolio/osinotameni_yasetai/node_modules/@babel/core/lib/config/config-descriptors.js:99:17) at createPluginDescriptors.next () at /Users/kodamarisa/portfolio/osinotameni_yasetai/node_modules/@babel/core/lib/gensync-utils/functional.js:39:27 at Generator.next () at mergeChainOpts (/Users/kodamarisa/portfolio/osinotameni_yasetai/node_modules/@babel/core/lib/config/config-chain.js:349:34) at mergeChainOpts.next () at chainWalker (/Users/kodamarisa/portfolio/osinotameni_yasetai/node_modules/@babel/core/lib/config/config-chain.js:316:14) at chainWalker.next () at loadFileChain (/Users/kodamarisa/portfolio/osinotameni_yasetai/node_modules/@babel/core/lib/config/config-chain.js:191:24) at loadFileChain.next () at buildRootChain (/Users/kodamarisa/portfolio/osinotameni_yasetai/node_modules/@babel/core/lib/config/config-chain.js:77:27) at buildRootChain.next () at loadPrivatePartialConfig (/Users/kodamarisa/portfolio/osinotameni_yasetai/node_modules/@babel/core/lib/config/partial.js:72:62) at loadPrivatePartialConfig.next () at loadPartialConfig (/Users/kodamarisa/portfolio/osinotameni_yasetai/node_modules/@babel/core/lib/config/partial.js:115:25) at loadPartialConfig.next () at step (/Users/kodamarisa/portfolio/osinotameni_yasetai/node_modules/gensync/index.js:269:25) at evaluateAsync (/Users/kodamarisa/portfolio/osinotameni_yasetai/node_modules/gensync/index.js:291:5) at /Users/kodamarisa/portfolio/osinotameni_yasetai/node_modules/gensync/index.js:93:9 at new Promise () at async (/Users/kodamarisa/portfolio/osinotameni_yasetai/node_modules/gensync/index.js:92:14) at stopHiding - secret - don't use this - v1 (/Users/kodamarisa/portfolio/osinotameni_yasetai/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js:47:12) at loadPartialConfigAsync (/Users/kodamarisa/portfolio/osinotameni_yasetai/node_modules/@babel/core/lib/config/index.js:34:85) at Object. (/Users/kodamarisa/portfolio/osinotameni_yasetai/node_modules/babel-loader/lib/index.js:126:26) at Generator.next () at asyncGeneratorStep (/Users/kodamarisa/portfolio/osinotameni_yasetai/node_modules/babel-loader/lib/index.js:3:103) at _next (/Users/kodamarisa/portfolio/osinotameni_yasetai/node_modules/babel-loader/lib/index.js:4:194) at /Users/kodamarisa/portfolio/osinotameni_yasetai/node_modules/babel-loader/lib/index.js:4:364 at new Promise ()


- エラーから考えられる原因
- 試したこと
https://school.runteq.jp/v2/questions/6164
https://school.runteq.jp/v2/questions/5964
https://qiita.com/Uchibori/items/2f754b370fbbda34a09e
これらを参考にしています。どうかよろしくお願いします。
kenchasonakai commented 6 months ago

ERROR in ./app/javascript/packs/application.js Module build failed (from ./node_modules/babel-loader/lib/index.js): Error: Cannot find package '@babel/plugin-proposal-private-methods' imported from /Users/kodamarisa/portfolio/osinotameni_yasetai/babel-virtual-resolve-base.js

とでているのでapplication.js周りのコードの共有をお願いします

kodamarisa commented 6 months ago

app/javascript/packs/application.jsは

// This file is automatically compiled by Webpack, along with any other files
// present in this directory. You're encouraged to place your actual application logic in
// a relevant structure within app/javascript and only use these pack files to reference
// that code so it'll be compiled.

import Rails from "@rails/ujs"
import Turbolinks from "turbolinks"
import * as ActiveStorage from "@rails/activestorage"
import "channels"

Rails.start()
Turbolinks.start()
ActiveStorage.start()

となっています。

kenchasonakai commented 6 months ago

ありがとうございます! package.jsonを下記のように書き換えてローカルでassets:precompileが正常に実行できるか確認してみて下さい "@babel/plugin-proposal-private-methods": "^7.18.6"を下記の質問を参考に移動してます https://school.runteq.jp/v2/questions/6164

{
  "name": "osinotameni-yasetai",
  "private": true,
  "dependencies": {
    "@babel/plugin-proposal-private-property-in-object": "^7.21.11",
    "@rails/actioncable": "^6.0.0",
    "@rails/activestorage": "^6.0.0",
    "@rails/ujs": "^6.0.0",
    "@rails/webpacker": "5.4.4",
    "turbolinks": "^5.2.0",
    "webpack": "^4.46.0",
    "webpack-cli": "^3.3.12",
    "@babel/plugin-proposal-private-methods": "^7.18.6"
  },
  "version": "0.1.0",
  "devDependencies": {
    "webpack-dev-server": "^3"
  }
}
kodamarisa commented 6 months ago

package.jsonを書き換えて、yarn installし、bin/rails assets:precompile RAILS_ENV=productionを行いました。

kodamarisa@kodamarisanoMacBook-Pro osinotameni_yasetai % bin/rails assets:precompile RAILS_ENV=production
yarn install v1.22.21
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
warning " > @babel/plugin-proposal-private-property-in-object@7.21.11" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@babel/plugin-proposal-private-property-in-object > @babel/helper-create-class-features-plugin@7.24.5" has unmet peer dependency "@babel/core@^7.0.0".
warning "@babel/plugin-proposal-private-property-in-object > @babel/plugin-syntax-private-property-in-object@7.14.5" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@babel/plugin-proposal-private-property-in-object > @babel/helper-create-class-features-plugin > @babel/helper-replace-supers@7.24.1" has unmet peer dependency "@babel/core@^7.0.0".
warning " > @babel/plugin-proposal-private-methods@7.18.6" has unmet peer dependency "@babel/core@^7.0.0-0".
[4/4] 🔨  Building fresh packages...
✨  Done in 1.06s.
Warning: you are using an unstable release of Node.js (v15.14.0). If you encounter issues with Node.js, consider switching to an Active LTS release. More info: https://docs.npmjs.com/try-the-latest-stable-version-of-node
Everything's up-to-date. Nothing to do
kodamarisa commented 6 months ago

再度、git push heroku mainを行いましたが、エラーが出てきました。

kodamarisa@kodamarisanoMacBook-Pro osinotameni_yasetai % git push heroku main
Enumerating objects: 133, done.
Counting objects: 100% (133/133), done.
Delta compression using up to 10 threads
Compressing objects: 100% (116/116), done.
Writing objects: 100% (133/133), 167.52 KiB | 9.31 MiB/s, done.
Total 133 (delta 4), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (4/4), done.
remote: Updated 112 paths from 939fa6a
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Building on the Heroku-22 stack
remote: -----> Determining which buildpack to use for this app
remote:  !     Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used.
remote:             Detected buildpacks: Ruby,Node.js
remote:             See https://devcenter.heroku.com/articles/buildpacks#buildpack-detect-order
remote: -----> Ruby app detected
remote: -----> Installing bundler 2.3.25
remote: -----> Removing BUNDLED WITH version in the Gemfile.lock
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-3.1.4
remote: -----> Installing dependencies using bundler 2.3.25
remote:        Running: BUNDLE_WITHOUT='development:test' BUNDLE_PATH=vendor/bundle BUNDLE_BIN=vendor/bundle/bin BUNDLE_DEPLOYMENT=1 bundle install -j4
remote:        Fetching gem metadata from https://rubygems.org/..........
remote:        Fetching rake 13.2.1
remote:        Installing rake 13.2.1
remote:        Fetching minitest 5.22.3
remote:        Fetching builder 3.2.4
remote:        Fetching zeitwerk 2.6.13
remote:        Fetching concurrent-ruby 1.2.3
remote:        Installing builder 3.2.4
remote:        Installing zeitwerk 2.6.13
remote:        Installing concurrent-ruby 1.2.3
remote:        Installing minitest 5.22.3
remote:        Fetching erubi 1.12.0
remote:        Fetching racc 1.7.3
remote:        Fetching crass 1.0.6
remote:        Installing racc 1.7.3 with native extensions
remote:        Installing erubi 1.12.0
remote:        Fetching rack 2.2.9
remote:        Installing crass 1.0.6
remote:        Fetching nio4r 2.7.3
remote:        Installing rack 2.2.9
remote:        Fetching websocket-extensions 0.1.5
remote:        Installing websocket-extensions 0.1.5
remote:        Fetching marcel 1.0.4
remote:        Installing nio4r 2.7.3 with native extensions
remote:        Installing marcel 1.0.4
remote:        Fetching mini_mime 1.1.5
remote:        Fetching date 3.3.4
remote:        Installing date 3.3.4 with native extensions
remote:        Installing mini_mime 1.1.5
remote:        Fetching timeout 0.4.1
remote:        Installing timeout 0.4.1
remote:        Fetching msgpack 1.7.2
remote:        Installing msgpack 1.7.2 with native extensions
remote:        Using bundler 2.3.26
remote:        Fetching ffi 1.16.3
remote:        Installing ffi 1.16.3 with native extensions
remote:        Fetching method_source 1.1.0
remote:        Installing method_source 1.1.0
remote:        Fetching pg 1.5.6
remote:        Installing pg 1.5.6 with native extensions
remote:        Fetching thor 1.3.1
remote:        Installing thor 1.3.1
remote:        Fetching tilt 2.3.0
remote:        Installing tilt 2.3.0
remote:        Fetching semantic_range 3.0.0
remote:        Installing semantic_range 3.0.0
remote:        Fetching turbolinks-source 5.2.0
remote:        Installing turbolinks-source 5.2.0
remote:        Fetching i18n 1.14.5
remote:        Installing i18n 1.14.5
remote:        Fetching tzinfo 2.0.6
remote:        Installing tzinfo 2.0.6
remote:        Fetching websocket-driver 0.7.6
remote:        Installing websocket-driver 0.7.6 with native extensions
remote:        Fetching rack-test 2.1.0
remote:        Installing rack-test 2.1.0
remote:        Fetching rack-proxy 0.7.7
remote:        Installing rack-proxy 0.7.7
remote:        Fetching sprockets 4.2.1
remote:        Installing sprockets 4.2.1
remote:        Fetching net-protocol 0.2.2
remote:        Installing net-protocol 0.2.2
remote:        Fetching nokogiri 1.16.4 (x86_64-linux)
remote:        Installing nokogiri 1.16.4 (x86_64-linux)
remote:        Fetching puma 5.6.8
remote:        Installing puma 5.6.8 with native extensions
remote:        Fetching bootsnap 1.18.3
remote:        Installing bootsnap 1.18.3 with native extensions
remote:        Fetching turbolinks 5.2.1
remote:        Installing turbolinks 5.2.1
remote:        Fetching activesupport 6.1.7.7
remote:        Installing activesupport 6.1.7.7
remote:        Fetching net-pop 0.1.2
remote:        Installing net-pop 0.1.2
remote:        Fetching net-smtp 0.5.0
remote:        Installing net-smtp 0.5.0
remote:        Fetching loofah 2.22.0
remote:        Installing loofah 2.22.0
remote:        Fetching net-imap 0.4.11
remote:        Installing net-imap 0.4.11
remote:        Fetching sassc 2.4.0
remote:        Installing sassc 2.4.0 with native extensions
remote:        Fetching rails-dom-testing 2.2.0
remote:        Installing rails-dom-testing 2.2.0
remote:        Fetching globalid 1.2.1
remote:        Installing globalid 1.2.1
remote:        Fetching activemodel 6.1.7.7
remote:        Installing activemodel 6.1.7.7
remote:        Fetching rails-html-sanitizer 1.6.0
remote:        Installing rails-html-sanitizer 1.6.0
remote:        Fetching mail 2.8.1
remote:        Installing mail 2.8.1
remote:        Fetching activejob 6.1.7.7
remote:        Installing activejob 6.1.7.7
remote:        Fetching activerecord 6.1.7.7
remote:        Installing activerecord 6.1.7.7
remote:        Fetching actionview 6.1.7.7
remote:        Installing actionview 6.1.7.7
remote:        Fetching actionpack 6.1.7.7
remote:        Installing actionpack 6.1.7.7
remote:        Fetching jbuilder 2.12.0
remote:        Installing jbuilder 2.12.0
remote:        Fetching actioncable 6.1.7.7
remote:        Installing actioncable 6.1.7.7
remote:        Fetching activestorage 6.1.7.7
remote:        Installing activestorage 6.1.7.7
remote:        Fetching actionmailer 6.1.7.7
remote:        Installing actionmailer 6.1.7.7
remote:        Fetching railties 6.1.7.7
remote:        Fetching sprockets-rails 3.4.2
remote:        Installing sprockets-rails 3.4.2
remote:        Fetching actionmailbox 6.1.7.7
remote:        Installing railties 6.1.7.7
remote:        Installing actionmailbox 6.1.7.7
remote:        Fetching actiontext 6.1.7.7
remote:        Installing actiontext 6.1.7.7
remote:        Fetching rails 6.1.7.7
remote:        Fetching webpacker 5.4.4
remote:        Installing rails 6.1.7.7
remote:        Installing webpacker 5.4.4
remote:        Fetching sassc-rails 2.1.2
remote:        Installing sassc-rails 2.1.2
remote:        Fetching sass-rails 6.0.0
remote:        Installing sass-rails 6.0.0
remote:        Bundle complete! 18 Gemfile dependencies, 62 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 (75.52s)
remote:        Cleaning up the bundler cache.
remote:        Removing bundler (2.3.25)
remote: 
remote: ###### WARNING:
remote: 
remote:        Installing a default version (20.9.0) of Node.js.
remote:        This version is not pinned and can change over time, causing unexpected failures.
remote:        
remote:        Heroku recommends placing the `heroku/nodejs` buildpack in front of
remote:        `heroku/ruby` to install a specific version of node:
remote:        
remote:        https://devcenter.heroku.com/articles/ruby-support#node-js-support
remote: 
remote: 
remote: ###### WARNING:
remote: 
remote:        Installing a default version (1.22.19) of Yarn
remote:        This version is not pinned and can change over time, causing unexpected failures.
remote:        
remote:        Heroku recommends placing the `heroku/nodejs` buildpack in front of the `heroku/ruby`
remote:        buildpack as it offers more comprehensive Node.js support, including the ability to
remote:        customise the Node.js version:
remote:        
remote:        https://devcenter.heroku.com/articles/ruby-support#node-js-support
remote: 
remote: -----> Installing node-v20.9.0-linux-x64
remote: -----> Installing yarn-v1.22.19
remote: -----> Detecting rake tasks
remote: -----> Preparing app for Rails asset pipeline
remote:        Running: rake assets:precompile
remote:        yarn install v1.22.19
remote:        [1/4] Resolving packages...
remote:        [2/4] Fetching packages...
remote:        [3/4] Linking dependencies...
remote:        [4/4] Building fresh packages...
remote:        Done in 17.65s.
remote:        I, [2024-05-14T06:19:46.590473 #1376]  INFO -- : Writing /tmp/build_05030924/public/assets/manifest-b4bf6e57a53c2bdb55b8998cc94cd00883793c1c37c5e5aea3ef6749b4f6d92b.js
remote:        I, [2024-05-14T06:19:46.591293 #1376]  INFO -- : Writing /tmp/build_05030924/public/assets/manifest-b4bf6e57a53c2bdb55b8998cc94cd00883793c1c37c5e5aea3ef6749b4f6d92b.js.gz
remote:        I, [2024-05-14T06:19:46.591460 #1376]  INFO -- : Writing /tmp/build_05030924/public/assets/application-04c3ae28f07e1bf734223bf526d0cdd296440ef53bcb3f80b9f093c6bf02f747.css
remote:        I, [2024-05-14T06:19:46.591735 #1376]  INFO -- : Writing /tmp/build_05030924/public/assets/application-04c3ae28f07e1bf734223bf526d0cdd296440ef53bcb3f80b9f093c6bf02f747.css.gz
remote:        I, [2024-05-14T06:19:46.592192 #1376]  INFO -- : Writing /tmp/build_05030924/public/assets/boards-04024382391bb910584145d8113cf35ef376b55d125bb4516cebeb14ce788597.css
remote:        I, [2024-05-14T06:19:46.592400 #1376]  INFO -- : Writing /tmp/build_05030924/public/assets/boards-04024382391bb910584145d8113cf35ef376b55d125bb4516cebeb14ce788597.css.gz
remote:        I, [2024-05-14T06:19:46.592515 #1376]  INFO -- : Writing /tmp/build_05030924/public/assets/scaffolds-04c3ae28f07e1bf734223bf526d0cdd296440ef53bcb3f80b9f093c6bf02f747.css
remote:        I, [2024-05-14T06:19:46.592609 #1376]  INFO -- : Writing /tmp/build_05030924/public/assets/scaffolds-04c3ae28f07e1bf734223bf526d0cdd296440ef53bcb3f80b9f093c6bf02f747.css.gz
remote:        Compiling...
remote:        Compilation failed:
remote:        Hash: b449b0443a1100f3030c
remote:        Version: webpack 4.47.0
remote:        Time: 564ms
remote:        Built at: 05/14/2024 6:19:48 AM
remote:         2 assets
remote:        Entrypoint application = js/application-2fd404a3552ef15d6938.js js/application-2fd404a3552ef15d6938.js.map
remote:        [0] ./app/javascript/packs/application.js 4.43 KiB {0} [built] [failed] [1 error]
remote:        
remote:        ERROR in ./app/javascript/packs/application.js
remote:        Module build failed (from ./node_modules/babel-loader/lib/index.js):
remote:        Error: Cannot find package '@babel/plugin-proposal-private-methods' imported from /tmp/build_05030924/babel-virtual-resolve-base.js
remote:            at new NodeError (/tmp/build_05030924/node_modules/@babel/core/lib/vendor/import-meta-resolve.js:194:5)
remote:            at packageResolve (/tmp/build_05030924/node_modules/@babel/core/lib/vendor/import-meta-resolve.js:908:9)
remote:            at moduleResolve (/tmp/build_05030924/node_modules/@babel/core/lib/vendor/import-meta-resolve.js:937:20)
remote:            at defaultResolve (/tmp/build_05030924/node_modules/@babel/core/lib/vendor/import-meta-resolve.js:1007:15)
remote:            at resolve (/tmp/build_05030924/node_modules/@babel/core/lib/vendor/import-meta-resolve.js:1020:12)
remote:            at tryImportMetaResolve (/tmp/build_05030924/node_modules/@babel/core/lib/config/files/plugins.js:142:45)
remote:            at resolveStandardizedNameForImport (/tmp/build_05030924/node_modules/@babel/core/lib/config/files/plugins.js:164:19)
remote:            at resolveStandardizedName (/tmp/build_05030924/node_modules/@babel/core/lib/config/files/plugins.js:173:22)
remote:            at loadPlugin (/tmp/build_05030924/node_modules/@babel/core/lib/config/files/plugins.js:52:20)
remote:            at loadPlugin.next (<anonymous>)
remote:            at createDescriptor (/tmp/build_05030924/node_modules/@babel/core/lib/config/config-descriptors.js:140:16)
remote:            at createDescriptor.next (<anonymous>)
remote:            at step (/tmp/build_05030924/node_modules/gensync/index.js:261:32)
remote:            at evaluateAsync (/tmp/build_05030924/node_modules/gensync/index.js:291:5)
remote:            at /tmp/build_05030924/node_modules/gensync/index.js:44:11
remote:            at Array.forEach (<anonymous>)
remote:            at Function.async (/tmp/build_05030924/node_modules/gensync/index.js:43:15)
remote:            at Function.all (/tmp/build_05030924/node_modules/gensync/index.js:216:13)
remote:            at Generator.next (<anonymous>)
remote:            at createDescriptors (/tmp/build_05030924/node_modules/@babel/core/lib/config/config-descriptors.js:102:41)
remote:            at createDescriptors.next (<anonymous>)
remote:            at createPluginDescriptors (/tmp/build_05030924/node_modules/@babel/core/lib/config/config-descriptors.js:99:17)
remote:            at createPluginDescriptors.next (<anonymous>)
remote:            at /tmp/build_05030924/node_modules/@babel/core/lib/gensync-utils/functional.js:39:27
remote:            at Generator.next (<anonymous>)
remote:            at mergeChainOpts (/tmp/build_05030924/node_modules/@babel/core/lib/config/config-chain.js:349:34)
remote:            at mergeChainOpts.next (<anonymous>)
remote:            at chainWalker (/tmp/build_05030924/node_modules/@babel/core/lib/config/config-chain.js:316:14)
remote:            at chainWalker.next (<anonymous>)
remote:            at loadFileChain (/tmp/build_05030924/node_modules/@babel/core/lib/config/config-chain.js:191:24)
remote:            at loadFileChain.next (<anonymous>)
remote:            at buildRootChain (/tmp/build_05030924/node_modules/@babel/core/lib/config/config-chain.js:77:27)
remote:            at buildRootChain.next (<anonymous>)
remote:            at loadPrivatePartialConfig (/tmp/build_05030924/node_modules/@babel/core/lib/config/partial.js:72:62)
remote:            at loadPrivatePartialConfig.next (<anonymous>)
remote:            at loadPartialConfig (/tmp/build_05030924/node_modules/@babel/core/lib/config/partial.js:115:25)
remote:            at loadPartialConfig.next (<anonymous>)
remote:            at step (/tmp/build_05030924/node_modules/gensync/index.js:269:25)
remote:            at evaluateAsync (/tmp/build_05030924/node_modules/gensync/index.js:291:5)
remote:            at /tmp/build_05030924/node_modules/gensync/index.js:93:9
remote:            at new Promise (<anonymous>)
remote:            at async (/tmp/build_05030924/node_modules/gensync/index.js:92:14)
remote:            at stopHiding - secret - don't use this - v1 (/tmp/build_05030924/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js:47:12)
remote:            at loadPartialConfigAsync (/tmp/build_05030924/node_modules/@babel/core/lib/config/index.js:34:85)
remote:            at Object.<anonymous> (/tmp/build_05030924/node_modules/babel-loader/lib/index.js:126:26)
remote:            at Generator.next (<anonymous>)
remote:            at asyncGeneratorStep (/tmp/build_05030924/node_modules/babel-loader/lib/index.js:3:103)
remote:            at _next (/tmp/build_05030924/node_modules/babel-loader/lib/index.js:4:194)
remote:            at /tmp/build_05030924/node_modules/babel-loader/lib/index.js:4:364
remote:            at new Promise (<anonymous>)
remote:            at Object.<anonymous> (/tmp/build_05030924/node_modules/babel-loader/lib/index.js:4:97)
remote:            at Object._loader (/tmp/build_05030924/node_modules/babel-loader/lib/index.js:210:18)
remote:            at Object.loader (/tmp/build_05030924/node_modules/babel-loader/lib/index.js:48:18)
remote:            at Object.<anonymous> (/tmp/build_05030924/node_modules/babel-loader/lib/index.js:44:12)
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: b6d24f9e3bc990fc00825d1697f61c86e27211bb
remote:  !
remote:  ! We have detected that you have triggered a build from source code with version b6d24f9e3bc990fc00825d1697f61c86e27211bb
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 osinotameni-yasetai.
remote: 
To https://git.heroku.com/osinotameni-yasetai.git
 ! [remote rejected] main -> main (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/osinotameni-yasetai.git'
kenchasonakai commented 6 months ago

一度Herokuのダッシュボードからいまデプロイしようとしているアプリを削除してやり直してみてください その際下記の対応をやってみてください

こちらを参考にしてrubyとnodeの2のビルドパックを使用する設定をしてみてください https://devcenter.heroku.com/ja/articles/using-multiple-buildpacks-for-an-app

kodamarisa commented 6 months ago

指定された通り、アプリの作り直しを行い、ビルドパックを使用するように設定をしてみました。

kodamarisa@kodamarisanoMacBook-Pro osinotameni_yasetai % heroku create osinotameni-yasetai
Creating ⬢ osinotameni-yasetai... done
https://osinotameni-yasetai-8b5c48625703.herokuapp.com/ | https://git.heroku.com/osinotameni-yasetai.git
kodamarisa@kodamarisanoMacBook-Pro osinotameni_yasetai % heroku buildpacks:set heroku/ruby
Buildpack set. Next release on osinotameni-yasetai will use heroku/ruby.
Run git push heroku main to create a new release using this buildpack.
kodamarisa@kodamarisanoMacBook-Pro osinotameni_yasetai % heroku buildpacks:add --index 1 heroku/nodejs
Buildpack added. Next release on osinotameni-yasetai will use:
  1. heroku/nodejs
  2. heroku/ruby
Run git push heroku main to create a new release using these buildpacks.
kodamarisa@kodamarisanoMacBook-Pro osinotameni_yasetai % heroku buildpacks
=== osinotameni-yasetai Buildpack URLs

1. heroku/nodejs
2. heroku/ruby
kodamarisa commented 6 months ago

再度実行してみましたが、再びエラーが出現しています。

kodamarisa@kodamarisanoMacBook-Pro osinotameni_yasetai % git push heroku main
Enumerating objects: 133, done.
Counting objects: 100% (133/133), done.
Delta compression using up to 10 threads
Compressing objects: 100% (116/116), done.
Writing objects: 100% (133/133), 167.52 KiB | 11.17 MiB/s, done.
Total 133 (delta 4), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (4/4), done.
remote: Updated 112 paths from 939fa6a
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Building on the Heroku-22 stack
remote: -----> Using buildpacks:
remote:        1. heroku/nodejs
remote:        2. heroku/ruby
remote: -----> Node.js app detected
remote:        
remote: -----> Creating runtime environment
remote:        
remote:        NPM_CONFIG_LOGLEVEL=error
remote:        USE_YARN_CACHE=true
remote:        NODE_VERBOSE=false
remote:        NODE_ENV=production
remote:        NODE_MODULES_CACHE=true
remote:        
remote: -----> Installing binaries
remote:        engines.node (package.json):   unspecified
remote:        engines.npm (package.json):    unspecified (use default)
remote:        engines.yarn (package.json):   unspecified (use default)
remote:        
remote:        Resolving node version 20.x...
remote:        Downloading and installing node 20.13.1...
remote:        Using default npm version: 10.5.2
remote:        Resolving yarn version 1.22.x...
remote:        Downloading and installing yarn (1.22.22)
remote:        Installed yarn 1.22.22
remote:        
remote: -----> Installing dependencies
remote:        Installing node modules (yarn.lock)
remote:        yarn install v1.22.22
remote:        [1/4] Resolving packages...
remote:        [2/4] Fetching packages...
remote:        [3/4] Linking dependencies...
remote:        [4/4] Building fresh packages...
remote:        Done in 17.05s.
remote:        
remote: -----> Build
remote:        
remote: -----> Pruning devDependencies
remote:        yarn install v1.22.22
remote:        [1/4] Resolving packages...
remote:        [2/4] Fetching packages...
remote:        [3/4] Linking dependencies...
remote:        [4/4] Building fresh packages...
remote:        warning Ignored scripts due to flag.
remote:        Done in 2.28s.
remote:        
remote: -----> Caching build
remote:        - yarn cache
remote:        
remote: -----> Build succeeded!
remote:  !     This app may not specify any way to start a node process
remote:        https://devcenter.heroku.com/articles/nodejs-support#default-web-process-type
remote: 
remote: -----> Ruby app detected
remote: -----> Installing bundler 2.3.25
remote: -----> Removing BUNDLED WITH version in the Gemfile.lock
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-3.1.4
remote: -----> Installing dependencies using bundler 2.3.25
remote:        Running: BUNDLE_WITHOUT='development:test' BUNDLE_PATH=vendor/bundle BUNDLE_BIN=vendor/bundle/bin BUNDLE_DEPLOYMENT=1 bundle install -j4
remote:        Fetching gem metadata from https://rubygems.org/..........
remote:        Fetching rake 13.2.1
remote:        Installing rake 13.2.1
remote:        Fetching concurrent-ruby 1.2.3
remote:        Fetching zeitwerk 2.6.13
remote:        Fetching builder 3.2.4
remote:        Fetching minitest 5.22.3
remote:        Installing zeitwerk 2.6.13
remote:        Installing builder 3.2.4
remote:        Installing minitest 5.22.3
remote:        Fetching erubi 1.12.0
remote:        Installing concurrent-ruby 1.2.3
remote:        Fetching racc 1.7.3
remote:        Installing erubi 1.12.0
remote:        Fetching crass 1.0.6
remote:        Installing racc 1.7.3 with native extensions
remote:        Fetching rack 2.2.9
remote:        Installing crass 1.0.6
remote:        Fetching nio4r 2.7.3
remote:        Fetching websocket-extensions 0.1.5
remote:        Installing rack 2.2.9
remote:        Installing websocket-extensions 0.1.5
remote:        Fetching marcel 1.0.4
remote:        Installing nio4r 2.7.3 with native extensions
remote:        Installing marcel 1.0.4
remote:        Fetching mini_mime 1.1.5
remote:        Fetching date 3.3.4
remote:        Installing mini_mime 1.1.5
remote:        Installing date 3.3.4 with native extensions
remote:        Fetching timeout 0.4.1
remote:        Installing timeout 0.4.1
remote:        Fetching msgpack 1.7.2
remote:        Installing msgpack 1.7.2 with native extensions
remote:        Using bundler 2.3.26
remote:        Fetching ffi 1.16.3
remote:        Installing ffi 1.16.3 with native extensions
remote:        Fetching method_source 1.1.0
remote:        Installing method_source 1.1.0
remote:        Fetching pg 1.5.6
remote:        Installing pg 1.5.6 with native extensions
remote:        Fetching thor 1.3.1
remote:        Installing thor 1.3.1
remote:        Fetching tilt 2.3.0
remote:        Installing tilt 2.3.0
remote:        Fetching semantic_range 3.0.0
remote:        Installing semantic_range 3.0.0
remote:        Fetching turbolinks-source 5.2.0
remote:        Installing turbolinks-source 5.2.0
remote:        Fetching i18n 1.14.5
remote:        Installing i18n 1.14.5
remote:        Fetching tzinfo 2.0.6
remote:        Installing tzinfo 2.0.6
remote:        Fetching rack-test 2.1.0
remote:        Installing rack-test 2.1.0
remote:        Fetching rack-proxy 0.7.7
remote:        Installing rack-proxy 0.7.7
remote:        Fetching sprockets 4.2.1
remote:        Installing sprockets 4.2.1
remote:        Fetching websocket-driver 0.7.6
remote:        Installing websocket-driver 0.7.6 with native extensions
remote:        Fetching net-protocol 0.2.2
remote:        Installing net-protocol 0.2.2
remote:        Fetching nokogiri 1.16.4 (x86_64-linux)
remote:        Installing nokogiri 1.16.4 (x86_64-linux)
remote:        Fetching puma 5.6.8
remote:        Installing puma 5.6.8 with native extensions
remote:        Fetching bootsnap 1.18.3
remote:        Installing bootsnap 1.18.3 with native extensions
remote:        Fetching turbolinks 5.2.1
remote:        Installing turbolinks 5.2.1
remote:        Fetching activesupport 6.1.7.7
remote:        Installing activesupport 6.1.7.7
remote:        Fetching net-pop 0.1.2
remote:        Installing net-pop 0.1.2
remote:        Fetching net-smtp 0.5.0
remote:        Installing net-smtp 0.5.0
remote:        Fetching loofah 2.22.0
remote:        Installing loofah 2.22.0
remote:        Fetching net-imap 0.4.11
remote:        Installing net-imap 0.4.11
remote:        Fetching sassc 2.4.0
remote:        Installing sassc 2.4.0 with native extensions
remote:        Fetching rails-dom-testing 2.2.0
remote:        Installing rails-dom-testing 2.2.0
remote:        Fetching globalid 1.2.1
remote:        Installing globalid 1.2.1
remote:        Fetching activemodel 6.1.7.7
remote:        Installing activemodel 6.1.7.7
remote:        Fetching rails-html-sanitizer 1.6.0
remote:        Installing rails-html-sanitizer 1.6.0
remote:        Fetching mail 2.8.1
remote:        Installing mail 2.8.1
remote:        Fetching activejob 6.1.7.7
remote:        Installing activejob 6.1.7.7
remote:        Fetching activerecord 6.1.7.7
remote:        Installing activerecord 6.1.7.7
remote:        Fetching actionview 6.1.7.7
remote:        Installing actionview 6.1.7.7
remote:        Fetching actionpack 6.1.7.7
remote:        Fetching jbuilder 2.12.0
remote:        Installing jbuilder 2.12.0
remote:        Installing actionpack 6.1.7.7
remote:        Fetching actioncable 6.1.7.7
remote:        Fetching activestorage 6.1.7.7
remote:        Installing actioncable 6.1.7.7
remote:        Installing activestorage 6.1.7.7
remote:        Fetching actionmailer 6.1.7.7
remote:        Fetching railties 6.1.7.7
remote:        Installing actionmailer 6.1.7.7
remote:        Fetching sprockets-rails 3.4.2
remote:        Installing sprockets-rails 3.4.2
remote:        Fetching actionmailbox 6.1.7.7
remote:        Installing railties 6.1.7.7
remote:        Installing actionmailbox 6.1.7.7
remote:        Fetching actiontext 6.1.7.7
remote:        Installing actiontext 6.1.7.7
remote:        Fetching rails 6.1.7.7
remote:        Fetching webpacker 5.4.4
remote:        Installing rails 6.1.7.7
remote:        Installing webpacker 5.4.4
remote:        Fetching sassc-rails 2.1.2
remote:        Installing sassc-rails 2.1.2
remote:        Fetching sass-rails 6.0.0
remote:        Installing sass-rails 6.0.0
remote:        Bundle complete! 18 Gemfile dependencies, 62 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 (76.09s)
remote:        Cleaning up the bundler cache.
remote:        Removing bundler (2.3.25)
remote: -----> Detecting rake tasks
remote: -----> Preparing app for Rails asset pipeline
remote:        Running: rake assets:precompile
remote:        yarn install v1.22.22
remote:        [1/4] Resolving packages...
remote:        [2/4] Fetching packages...
remote:        [4/4] Building fresh packages...
remote:        Done in 16.01s.
remote:        I, [2024-05-14T06:59:38.613905 #3006]  INFO -- : Writing /tmp/build_637b0ca2/public/assets/manifest-b4bf6e57a53c2bdb55b8998cc94cd00883793c1c37c5e5aea3ef6749b4f6d92b.js
remote:        I, [2024-05-14T06:59:38.614254 #3006]  INFO -- : Writing /tmp/build_637b0ca2/public/assets/manifest-b4bf6e57a53c2bdb55b8998cc94cd00883793c1c37c5e5aea3ef6749b4f6d92b.js.gz
remote:        I, [2024-05-14T06:59:38.614408 #3006]  INFO -- : Writing /tmp/build_637b0ca2/public/assets/application-04c3ae28f07e1bf734223bf526d0cdd296440ef53bcb3f80b9f093c6bf02f747.css
remote:        I, [2024-05-14T06:59:38.614500 #3006]  INFO -- : Writing /tmp/build_637b0ca2/public/assets/application-04c3ae28f07e1bf734223bf526d0cdd296440ef53bcb3f80b9f093c6bf02f747.css.gz
remote:        I, [2024-05-14T06:59:38.614836 #3006]  INFO -- : Writing /tmp/build_637b0ca2/public/assets/boards-04024382391bb910584145d8113cf35ef376b55d125bb4516cebeb14ce788597.css
remote:        I, [2024-05-14T06:59:38.615381 #3006]  INFO -- : Writing /tmp/build_637b0ca2/public/assets/boards-04024382391bb910584145d8113cf35ef376b55d125bb4516cebeb14ce788597.css.gz
remote:        I, [2024-05-14T06:59:38.615498 #3006]  INFO -- : Writing /tmp/build_637b0ca2/public/assets/scaffolds-04c3ae28f07e1bf734223bf526d0cdd296440ef53bcb3f80b9f093c6bf02f747.css
remote:        I, [2024-05-14T06:59:38.615578 #3006]  INFO -- : Writing /tmp/build_637b0ca2/public/assets/scaffolds-04c3ae28f07e1bf734223bf526d0cdd296440ef53bcb3f80b9f093c6bf02f747.css.gz
remote:        Compiling...
remote:        Compilation failed:
remote:        Hash: 14f4b335d51235bf4f7f
remote:        Version: webpack 4.47.0
remote:        Time: 510ms
remote:        Built at: 05/14/2024 6:59:40 AM
remote:         2 assets
remote:        Entrypoint application = js/application-3825b4670fcc25cbdd10.js js/application-3825b4670fcc25cbdd10.js.map
remote:        [0] ./app/javascript/packs/application.js 4.54 KiB {0} [built] [failed] [1 error]
remote:        
remote:        ERROR in ./app/javascript/packs/application.js
remote:        Module build failed (from ./node_modules/babel-loader/lib/index.js):
remote:        Error: Cannot find package '@babel/plugin-proposal-private-methods' imported from /tmp/build_637b0ca2/babel-virtual-resolve-base.js
remote:            at __node_internal_ (/tmp/build_637b0ca2/node_modules/@babel/core/lib/vendor/import-meta-resolve.js:224:9)
remote:            at new NodeError (/tmp/build_637b0ca2/node_modules/@babel/core/lib/vendor/import-meta-resolve.js:194:5)
remote:            at packageResolve (/tmp/build_637b0ca2/node_modules/@babel/core/lib/vendor/import-meta-resolve.js:908:9)
remote:            at moduleResolve (/tmp/build_637b0ca2/node_modules/@babel/core/lib/vendor/import-meta-resolve.js:937:20)
remote:            at defaultResolve (/tmp/build_637b0ca2/node_modules/@babel/core/lib/vendor/import-meta-resolve.js:1007:15)
remote:            at resolve (/tmp/build_637b0ca2/node_modules/@babel/core/lib/vendor/import-meta-resolve.js:1020:12)
remote:            at tryImportMetaResolve (/tmp/build_637b0ca2/node_modules/@babel/core/lib/config/files/plugins.js:142:45)
remote:            at resolveStandardizedNameForImport (/tmp/build_637b0ca2/node_modules/@babel/core/lib/config/files/plugins.js:164:19)
remote:            at resolveStandardizedName (/tmp/build_637b0ca2/node_modules/@babel/core/lib/config/files/plugins.js:173:22)
remote:            at loadPlugin (/tmp/build_637b0ca2/node_modules/@babel/core/lib/config/files/plugins.js:52:20)
remote:            at loadPlugin.next (<anonymous>)
remote:            at createDescriptor (/tmp/build_637b0ca2/node_modules/@babel/core/lib/config/config-descriptors.js:140:16)
remote:            at createDescriptor.next (<anonymous>)
remote:            at step (/tmp/build_637b0ca2/node_modules/gensync/index.js:261:32)
remote:            at evaluateAsync (/tmp/build_637b0ca2/node_modules/gensync/index.js:291:5)
remote:            at /tmp/build_637b0ca2/node_modules/gensync/index.js:44:11
remote:            at Array.forEach (<anonymous>)
remote:            at Function.async (/tmp/build_637b0ca2/node_modules/gensync/index.js:43:15)
remote:            at Function.all (/tmp/build_637b0ca2/node_modules/gensync/index.js:216:13)
remote:            at Generator.next (<anonymous>)
remote:            at createDescriptors (/tmp/build_637b0ca2/node_modules/@babel/core/lib/config/config-descriptors.js:102:41)
remote:            at createDescriptors.next (<anonymous>)
remote:            at createPluginDescriptors (/tmp/build_637b0ca2/node_modules/@babel/core/lib/config/config-descriptors.js:99:17
remote:            at createPluginDescriptors.next (<anonymous>)
remote:            at /tmp/build_637b0ca2/node_modules/@babel/core/lib/gensync-utils/functional.js:39:27
remote:            at Generator.next (<anonymous>)
remote:            at mergeChainOpts (/tmp/build_637b0ca2/node_modules/@babel/core/lib/config/config-chain.js:349:34)
remote:            at mergeChainOpts.next (<anonymous>)
remote:            at chainWalker (/tmp/build_637b0ca2/node_modules/@babel/core/lib/config/config-chain.js:316:14)
remote:            at chainWalker.next (<anonymous>)
remote:            at loadFileChain (/tmp/build_637b0ca2/node_modules/@babel/core/lib/config/config-chain.js:191:24)
remote:            at loadFileChain.next (<anonymous>)
remote:            at buildRootChain (/tmp/build_637b0ca2/node_modules/@babel/core/lib/config/config-chain.js:77:27)
remote:            at buildRootChain.next (<anonymous>)
remote:            at loadPrivatePartialConfig (/tmp/build_637b0ca2/node_modules/@babel/core/lib/config/partial.js:72:62)
remote:            at loadPrivatePartialConfig.next (<anonymous>)
remote:            at loadPartialConfig (/tmp/build_637b0ca2/node_modules/@babel/core/lib/config/partial.js:115:25)
remote:            at loadPartialConfig.next (<anonymous>)
remote:            at step (/tmp/build_637b0ca2/node_modules/gensync/index.js:269:25)
remote:            at evaluateAsync (/tmp/build_637b0ca2/node_modules/gensync/index.js:291:5)
remote:            at /tmp/build_637b0ca2/node_modules/gensync/index.js:93:9
remote:            at new Promise (<anonymous>)
remote:            at async (/tmp/build_637b0ca2/node_modules/gensync/index.js:92:14)
remote:            at stopHiding - secret - don't use this - v1 (/tmp/build_637b0ca2/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js:47:12)
remote:            at loadPartialConfigAsync (/tmp/build_637b0ca2/node_modules/@babel/core/lib/config/index.js:34:85)
remote:            at Object.<anonymous> (/tmp/build_637b0ca2/node_modules/babel-loader/lib/index.js:126:26)
remote:            at Generator.next (<anonymous>)
remote:            at asyncGeneratorStep (/tmp/build_637b0ca2/node_modules/babel-loader/lib/index.js:3:103)
remote:            at _next (/tmp/build_637b0ca2/node_modules/babel-loader/lib/index.js:4:194)
remote:            at /tmp/build_637b0ca2/node_modules/babel-loader/lib/index.js:4:364
remote:            at new Promise (<anonymous>)
remote:            at Object.<anonymous> (/tmp/build_637b0ca2/node_modules/babel-loader/lib/index.js:4:97)
remote:            at Object._loader (/tmp/build_637b0ca2/node_modules/babel-loader/lib/index.js:210:18)
remote:            at Object.loader (/tmp/build_637b0ca2/node_modules/babel-loader/lib/index.js:48:18)
remote:            at Object.<anonymous> (/tmp/build_637b0ca2/node_modules/babel-loader/lib/index.js:44:12)
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 osinotameni-yasetai.
remote: 
To https://git.heroku.com/osinotameni-yasetai.git
 ! [remote rejected] main -> main (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/osinotameni-yasetai.git'
kodamarisa@kodamarisanoMacBook-Pro osinotameni_yasetai % git status
On branch setting
nothing to commit, working tree clean
kenchasonakai commented 6 months ago

開発環境のNode.jsは15.14.0で本番環境が20.13.1のバージョンになっているみたいなので本番環境のNode.jsを15系を使うようにしてみましょうか enginesを使うと指定できたと思うので下記のようにやってみてください

{
  "name": "osinotameni-yasetai",
  "private": true,
  "engines": {
    "node": "15.x"
  },
  "dependencies": {
    "@babel/plugin-proposal-private-property-in-object": "^7.21.11",
    "@rails/actioncable": "^6.0.0",
    "@rails/activestorage": "^6.0.0",
    "@rails/ujs": "^6.0.0",
    "@rails/webpacker": "5.4.4",
    "turbolinks": "^5.2.0",
    "webpack": "^4.46.0",
    "webpack-cli": "^3.3.12",
    "@babel/plugin-proposal-private-methods": "^7.18.6"
  },
  "version": "0.1.0",
  "devDependencies": {
    "webpack-dev-server": "^3"
  }
}

https://qiita.com/suin/items/994458418c737cc9c3e8

kodamarisa commented 6 months ago

変更をし、commitした後に再度挑戦してみましたが、エラーが出てしまいました。

{
  "name": "osinotameni-yasetai",
  "private": true,
  "engines": {
    "node": "15.x"
  },
  "dependencies": {
    "@babel/plugin-proposal-private-property-in-object": "^7.21.11",
    "@rails/actioncable": "^6.0.0",
    "@rails/activestorage": "^6.0.0",
    "@rails/ujs": "^6.0.0",
    "@rails/webpacker": "5.4.4",
    "turbolinks": "^5.2.0",
    "webpack": "^4.46.0",
    "webpack-cli": "^3.3.12",
    "@babel/plugin-proposal-private-methods": "^7.18.6"
  },
  "version": "0.1.0",
  "devDependencies": {
    "webpack-dev-server": "^3"
  }
}
kodamarisa@kodamarisanoMacBook-Pro osinotameni_yasetai % git push heroku main
Enumerating objects: 133, done.
Counting objects: 100% (133/133), done.
Delta compression using up to 10 threads
Compressing objects: 100% (116/116), done.
Writing objects: 100% (133/133), 167.52 KiB | 10.47 MiB/s, done.
Total 133 (delta 4), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (4/4), done.
remote: Updated 112 paths from 939fa6a
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Building on the Heroku-22 stack
remote: -----> Using buildpacks:
remote:        1. heroku/nodejs
remote:        2. heroku/ruby
remote: -----> Node.js app detected
remote:        
remote: -----> Creating runtime environment
remote:        
remote:        NPM_CONFIG_LOGLEVEL=error
remote:        USE_YARN_CACHE=true
remote:        NODE_VERBOSE=false
remote:        NODE_ENV=production
remote:        NODE_MODULES_CACHE=true
remote:        
remote: -----> Installing binaries
remote:        engines.node (package.json):   unspecified
remote:        engines.npm (package.json):    unspecified (use default)
remote:        engines.yarn (package.json):   unspecified (use default)
remote:        
remote:        Resolving node version 20.x...
remote:        Downloading and installing node 20.13.1...
remote:        Using default npm version: 10.5.2
remote:        Resolving yarn version 1.22.x...
remote:        Downloading and installing yarn (1.22.22)
remote:        Installed yarn 1.22.22
remote:        
remote: -----> Installing dependencies
remote:        Installing node modules (yarn.lock)
remote:        yarn install v1.22.22
remote:        [1/4] Resolving packages...
remote:        [2/4] Fetching packages...
remote:        [3/4] Linking dependencies...
remote:        [4/4] Building fresh packages...
remote:        Done in 17.12s.
remote:        
remote: -----> Build
remote:        
remote: -----> Pruning devDependencies
remote:        yarn install v1.22.22
remote:        [1/4] Resolving packages...
remote:        [2/4] Fetching packages...
remote:        [3/4] Linking dependencies...
remote:        [4/4] Building fresh packages...
remote:        warning Ignored scripts due to flag.
remote:        Done in 2.20s.
remote:        
remote: -----> Caching build
remote:        - yarn cache
remote:        
remote: -----> Build succeeded!
remote:  !     This app may not specify any way to start a node process
remote:        https://devcenter.heroku.com/articles/nodejs-support#default-web-process-type
remote: 
remote: -----> Ruby app detected
remote: -----> Installing bundler 2.3.25
remote: -----> Removing BUNDLED WITH version in the Gemfile.lock
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-3.1.4
remote: -----> Installing dependencies using bundler 2.3.25
remote:        Running: BUNDLE_WITHOUT='development:test' BUNDLE_PATH=vendor/bundle BUNDLE_BIN=vendor/bundle/bin BUNDLE_DEPLOYMENT=1 bundle install -j4
remote:        Fetching gem metadata from https://rubygems.org/..........
remote:        Fetching rake 13.2.1
remote:        Installing rake 13.2.1
remote:        Fetching concurrent-ruby 1.2.3
remote:        Fetching minitest 5.22.3
remote:        Fetching builder 3.2.4
remote:        Fetching zeitwerk 2.6.13
remote:        Installing builder 3.2.4
remote:        Installing zeitwerk 2.6.13
remote:        Fetching erubi 1.12.0
remote:        Installing minitest 5.22.3
remote:        Installing erubi 1.12.0
remote:        Fetching racc 1.7.3
remote:        Fetching crass 1.0.6
remote:        Fetching rack 2.2.9
remote:        Installing racc 1.7.3 with native extensions
remote:        Installing crass 1.0.6
remote:        Fetching nio4r 2.7.3
remote:        Installing rack 2.2.9
remote:        Installing nio4r 2.7.3 with native extensions
remote:        Installing concurrent-ruby 1.2.3
remote:        Fetching websocket-extensions 0.1.5
remote:        Installing websocket-extensions 0.1.5
remote:        Fetching marcel 1.0.4
remote:        Fetching mini_mime 1.1.5
remote:        Installing marcel 1.0.4
remote:        Fetching date 3.3.4
remote:        Installing mini_mime 1.1.5
remote:        Fetching timeout 0.4.1
remote:        Installing date 3.3.4 with native extensions
remote:        Installing timeout 0.4.1
remote:        Fetching msgpack 1.7.2
remote:        Installing msgpack 1.7.2 with native extensions
remote:        Using bundler 2.3.26
remote:        Fetching ffi 1.16.3
remote:        Installing ffi 1.16.3 with native extensions
remote:        Fetching method_source 1.1.0
remote:        Installing method_source 1.1.0
remote:        Fetching pg 1.5.6
remote:        Installing pg 1.5.6 with native extensions
remote:        Fetching thor 1.3.1
remote:        Installing thor 1.3.1
remote:        Fetching tilt 2.3.0
remote:        Installing tilt 2.3.0
remote:        Fetching semantic_range 3.0.0
remote:        Installing semantic_range 3.0.0
remote:        Fetching turbolinks-source 5.2.0
remote:        Installing turbolinks-source 5.2.0
remote:        Fetching rack-test 2.1.0
remote:        Installing rack-test 2.1.0
remote:        Fetching rack-proxy 0.7.7
remote:        Installing rack-proxy 0.7.7
remote:        Fetching websocket-driver 0.7.6
remote:        Installing websocket-driver 0.7.6 with native extensions
remote:        Fetching i18n 1.14.5
remote:        Installing i18n 1.14.5
remote:        Fetching tzinfo 2.0.6
remote:        Installing tzinfo 2.0.6
remote:        Fetching sprockets 4.2.1
remote:        Installing sprockets 4.2.1
remote:        Fetching net-protocol 0.2.2
remote:        Installing net-protocol 0.2.2
remote:        Fetching nokogiri 1.16.4 (x86_64-linux)
remote:        Installing nokogiri 1.16.4 (x86_64-linux)
remote:        Fetching puma 5.6.8
remote:        Installing puma 5.6.8 with native extensions
remote:        Fetching bootsnap 1.18.3
remote:        Installing bootsnap 1.18.3 with native extensions
remote:        Fetching turbolinks 5.2.1
remote:        Installing turbolinks 5.2.1
remote:        Fetching activesupport 6.1.7.7
remote:        Installing activesupport 6.1.7.7
remote:        Fetching net-pop 0.1.2
remote:        Installing net-pop 0.1.2
remote:        Fetching net-smtp 0.5.0
remote:        Installing net-smtp 0.5.0
remote:        Fetching loofah 2.22.0
remote:        Installing loofah 2.22.0
remote:        Fetching net-imap 0.4.11
remote:        Installing net-imap 0.4.11
remote:        Fetching sassc 2.4.0
remote:        Installing sassc 2.4.0 with native extensions
remote:        Fetching rails-dom-testing 2.2.0
remote:        Installing rails-dom-testing 2.2.0
remote:        Fetching globalid 1.2.1
remote:        Installing globalid 1.2.1
remote:        Fetching activemodel 6.1.7.7
remote:        Installing activemodel 6.1.7.7
remote:        Fetching rails-html-sanitizer 1.6.0
remote:        Installing rails-html-sanitizer 1.6.0
remote:        Fetching mail 2.8.1
remote:        Installing mail 2.8.1
remote:        Fetching activejob 6.1.7.7
remote:        Installing activejob 6.1.7.7
remote:        Fetching activerecord 6.1.7.7
remote:        Installing activerecord 6.1.7.7
remote:        Fetching actionview 6.1.7.7
remote:        Installing actionview 6.1.7.7
remote:        Fetching actionpack 6.1.7.7
remote:        Fetching jbuilder 2.12.0
remote:        Installing jbuilder 2.12.0
remote:        Installing actionpack 6.1.7.7
remote:        Fetching actioncable 6.1.7.7
remote:        Fetching activestorage 6.1.7.7
remote:        Installing actioncable 6.1.7.7
remote:        Installing activestorage 6.1.7.7
remote:        Fetching actionmailer 6.1.7.7
remote:        Fetching railties 6.1.7.7
remote:        Installing actionmailer 6.1.7.7
remote:        Fetching sprockets-rails 3.4.2
remote:        Installing railties 6.1.7.7
remote:        Installing sprockets-rails 3.4.2
remote:        Fetching actionmailbox 6.1.7.7
remote:        Installing actionmailbox 6.1.7.7
remote:        Fetching actiontext 6.1.7.7
remote:        Installing actiontext 6.1.7.7
remote:        Fetching rails 6.1.7.7
remote:        Fetching webpacker 5.4.4
remote:        Installing rails 6.1.7.7
remote:        Installing webpacker 5.4.4
remote:        Fetching sassc-rails 2.1.2
remote:        Installing sassc-rails 2.1.2
remote:        Fetching sass-rails 6.0.0
remote:        Installing sass-rails 6.0.0
remote:        Bundle complete! 18 Gemfile dependencies, 62 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 (76.66s)
remote:        Cleaning up the bundler cache.
remote:        Removing bundler (2.3.25)
remote: -----> Detecting rake tasks
remote: -----> Preparing app for Rails asset pipeline
remote:        Running: rake assets:precompile
remote:        yarn install v1.22.22
remote:        [1/4] Resolving packages...
remote:        [2/4] Fetching packages...
remote:        [3/4] Linking dependencies...
remote:        [4/4] Building fresh packages...
remote:        Done in 16.37s.
remote:        I, [2024-05-14T09:14:25.449526 #3008]  INFO -- : Writing /tmp/build_4c40b69a/public/assets/manifest-b4bf6e57a53c2bdb55b8998cc94cd00883793c1c37c5e5aea3ef6749b4f6d92b.js
remote:        I, [2024-05-14T09:14:25.449796 #3008]  INFO -- : Writing /tmp/build_4c40b69a/public/assets/manifest-b4bf6e57a53c2bdb55b8998cc94cd00883793c1c37c5e5aea3ef6749b4f6d92b.js.gz
remote:        I, [2024-05-14T09:14:25.449945 #3008]  INFO -- : Writing /tmp/build_4c40b69a/public/assets/application-04c3ae28f07e1bf734223bf526d0cdd296440ef53bcb3f80b9f093c6bf02f747.css
remote:        I, [2024-05-14T09:14:25.450031 #3008]  INFO -- : Writing /tmp/build_4c40b69a/public/assets/application-04c3ae28f07e1bf734223bf526d0cdd296440ef53bcb3f80b9f093c6bf02f747.css.gz
remote:        I, [2024-05-14T09:14:25.450127 #3008]  INFO -- : Writing /tmp/build_4c40b69a/public/assets/boards-04024382391bb910584145d8113cf35ef376b55d125bb4516cebeb14ce788597.css
remote:        I, [2024-05-14T09:14:25.450207 #3008]  INFO -- : Writing /tmp/build_4c40b69a/public/assets/boards-04024382391bb910584145d8113cf35ef376b55d125bb4516cebeb14ce788597.css.gz
remote:        I, [2024-05-14T09:14:25.450306 #3008]  INFO -- : Writing /tmp/build_4c40b69a/public/assets/scaffolds-04c3ae28f07e1bf734223bf526d0cdd296440ef53bcb3f80b9f093c6bf02f747.css
remote:        I, [2024-05-14T09:14:25.450376 #3008]  INFO -- : Writing /tmp/build_4c40b69a/public/assets/scaffolds-04c3ae28f07e1bf734223bf526d0cdd296440ef53bcb3f80b9f093c6bf02f747.css.gz
remote:        Compiling...
remote:        Compilation failed:
remote:        Hash: c0ce7dc19eda901b19d4
remote:        Version: webpack 4.47.0
remote:        Time: 586ms
remote:        Built at: 05/14/2024 9:14:27 AM
remote:         2 assets
remote:        Entrypoint application = js/application-a0c77640bcfff3bf2b20.js js/application-a0c77640bcfff3bf2b20.js.map
remote:        [0] ./app/javascript/packs/application.js 4.54 KiB {0} [built] [failed] [1 error]
remote:        
remote:        ERROR in ./app/javascript/packs/application.js
remote:        Module build failed (from ./node_modules/babel-loader/lib/index.js):
remote:        Error: Cannot find package '@babel/plugin-proposal-private-methods' imported from /tmp/build_4c40b69a/babel-virtual-resolve-base.js
remote:            at __node_internal_ (/tmp/build_4c40b69a/node_modules/@babel/core/lib/vendor/import-meta-resolve.js:224:9)
remote:            at new NodeError (/tmp/build_4c40b69a/node_modules/@babel/core/lib/vendor/import-meta-resolve.js:194:5)
remote:            at packageResolve (/tmp/build_4c40b69a/node_modules/@babel/core/lib/vendor/import-meta-resolve.js:908:9)
remote:            at moduleResolve (/tmp/build_4c40b69a/node_modules/@babel/core/lib/vendor/import-meta-resolve.js:937:20)
remote:            at defaultResolve (/tmp/build_4c40b69a/node_modules/@babel/core/lib/vendor/import-meta-resolve.js:1007:15)
remote:            at resolve (/tmp/build_4c40b69a/node_modules/@babel/core/lib/vendor/import-meta-resolve.js:1020:12)
remote:            at tryImportMetaResolve (/tmp/build_4c40b69a/node_modules/@babel/core/lib/config/files/plugins.js:142:45)
remote:            at resolveStandardizedNameForImport (/tmp/build_4c40b69a/node_modules/@babel/core/lib/config/files/plugins.js:164:19)
remote:            at resolveStandardizedName (/tmp/build_4c40b69a/node_modules/@babel/core/lib/config/files/plugins.js:173:22)
remote:            at loadPlugin (/tmp/build_4c40b69a/node_modules/@babel/core/lib/config/files/plugins.js:52:20)
remote:            at loadPlugin.next (<anonymous>)
remote:            at createDescriptor (/tmp/build_4c40b69a/node_modules/@babel/core/lib/config/config-descriptors.js:140:16)
remote:            at createDescriptor.next (<anonymous>)
remote:            at step (/tmp/build_4c40b69a/node_modules/gensync/index.js:261:32)
remote:            at evaluateAsync (/tmp/build_4c40b69a/node_modules/gensync/index.js:291:5)
remote:            at /tmp/build_4c40b69a/node_modules/gensync/index.js:44:11
remote:            at Array.forEach (<anonymous>)
remote:            at Function.async (/tmp/build_4c40b69a/node_modules/gensync/index.js:43:15)
remote:            at Function.all (/tmp/build_4c40b69a/node_modules/gensync/index.js:216:13)
remote:            at Generator.next (<anonymous>)
remote:            at createDescriptors (/tmp/build_4c40b69a/node_modules/@babel/core/lib/config/config-descriptors.js:102:41)
remote:            at createDescriptors.next (<anonymous>)
remote:            at createPluginDescriptors (/tmp/build_4c40b69a/node_modules/@babel/core/lib/config/config-descriptors.js:99:17
remote:            at createPluginDescriptors.next (<anonymous>)
remote:            at /tmp/build_4c40b69a/node_modules/@babel/core/lib/gensync-utils/functional.js:39:27
remote:            at Generator.next (<anonymous>)
remote:            at mergeChainOpts (/tmp/build_4c40b69a/node_modules/@babel/core/lib/config/config-chain.js:349:34)
remote:            at mergeChainOpts.next (<anonymous>)
remote:            at chainWalker (/tmp/build_4c40b69a/node_modules/@babel/core/lib/config/config-chain.js:316:14)
remote:            at chainWalker.next (<anonymous>)
remote:            at loadFileChain (/tmp/build_4c40b69a/node_modules/@babel/core/lib/config/config-chain.js:191:24)
remote:            at loadFileChain.next (<anonymous>)
remote:            at buildRootChain (/tmp/build_4c40b69a/node_modules/@babel/core/lib/config/config-chain.js:77:27)
remote:            at buildRootChain.next (<anonymous>)
remote:            at loadPrivatePartialConfig (/tmp/build_4c40b69a/node_modules/@babel/core/lib/config/partial.js:72:62)
remote:            at loadPrivatePartialConfig.next (<anonymous>)
remote:            at loadPartialConfig (/tmp/build_4c40b69a/node_modules/@babel/core/lib/config/partial.js:115:25)
remote:            at loadPartialConfig.next (<anonymous>)
remote:            at step (/tmp/build_4c40b69a/node_modules/gensync/index.js:269:25)
remote:            at evaluateAsync (/tmp/build_4c40b69a/node_modules/gensync/index.js:291:5)
remote:            at /tmp/build_4c40b69a/node_modules/gensync/index.js:93:9
remote:            at new Promise (<anonymous>)
remote:            at async (/tmp/build_4c40b69a/node_modules/gensync/index.js:92:14)
remote:            at stopHiding - secret - don't use this - v1 (/tmp/build_4c40b69a/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js:47:12)
remote:            at loadPartialConfigAsync (/tmp/build_4c40b69a/node_modules/@babel/core/lib/config/index.js:34:85)
remote:            at Object.<anonymous> (/tmp/build_4c40b69a/node_modules/babel-loader/lib/index.js:126:26)
remote:            at Generator.next (<anonymous>)
remote:            at asyncGeneratorStep (/tmp/build_4c40b69a/node_modules/babel-loader/lib/index.js:3:103)
remote:            at _next (/tmp/build_4c40b69a/node_modules/babel-loader/lib/index.js:4:194)
remote:            at /tmp/build_4c40b69a/node_modules/babel-loader/lib/index.js:4:364
remote:            at new Promise (<anonymous>)
remote:            at Object.<anonymous> (/tmp/build_4c40b69a/node_modules/babel-loader/lib/index.js:4:97)
remote:            at Object._loader (/tmp/build_4c40b69a/node_modules/babel-loader/lib/index.js:210:18)
remote:            at Object.loader (/tmp/build_4c40b69a/node_modules/babel-loader/lib/index.js:48:18)
remote:            at Object.<anonymous> (/tmp/build_4c40b69a/node_modules/babel-loader/lib/index.js:44:12)
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: b6d24f9e3bc990fc00825d1697f61c86e27211bb
remote:  !
remote:  ! We have detected that you have triggered a build from source code with version b6d24f9e3bc990fc00825d1697f61c86e27211bb
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 osinotameni-yasetai.
kenchasonakai commented 6 months ago

commit出来ているか確認したいので下記のコマンドの結果を共有していただけますか?

git branch
git status
git log
kodamarisa commented 6 months ago
kodamarisa@kodamarisanoMacBook-Pro osinotameni_yasetai % git branch
  main
* setting
kodamarisa@kodamarisanoMacBook-Pro osinotameni_yasetai % git status
On branch setting
nothing to commit, working tree clean
kodamarisa@kodamarisanoMacBook-Pro osinotameni_yasetai % git log
commit 012936549946b10e1ad3935ca0d1d739428aa99a (HEAD -> setting)
Author: kodama risa <retedg623@gmail.com>
Date:   Tue May 14 18:11:48 2024 +0900

    Node.jsのバージョンを15系に指定

commit 6aa9ea1dc0f0863a41ca859b4edbb3d5fc8293fb
Author: kodama risa <retedg623@gmail.com>
Date:   Tue May 14 15:17:38 2024 +0900

    デプロイのエラー解消

commit 7c7fec6080f26e9a1f967a5b5058c38ea2ba41df
Author: kodama risa <retedg623@gmail.com>
Date:   Tue May 14 02:09:44 2024 +0900

    際調整

commit f08d9e83a4fb28550b42d2cd75f0c6317db76435
Author: kodama risa <retedg623@gmail.com>
Date:   Tue May 14 01:51:46 2024 +0900

    不具合対応

commit c5e199c495e8f1b10c73bb13d0ac2aeafd3727b3
Author: kodama risa <retedg623@gmail.com>
Date:   Tue May 14 01:29:11 2024 +0900

    デプロイのセッティング

commit dc4be5d102da10c7c084f9d1989b2593b8843987 (origin/main)
Author: kodama risa <retedg623@gmail.com>
Date:   Mon May 13 23:34:36 2024 +0900

    環境の再構築

こんな感じになっています。

kenchasonakai commented 6 months ago

ありがとうございます! package.jsonの変更後yarn installを行っていなかったら実行してみてください

yarn install 
git status
kodamarisa commented 6 months ago
kodamarisa@kodamarisanoMacBook-Pro osinotameni_yasetai % yarn install
yarn install v1.22.21
[1/5] 🔍  Validating package.json...
[2/5] 🔍  Resolving packages...
success Already up-to-date.
✨  Done in 0.23s.
kodamarisa@kodamarisanoMacBook-Pro osinotameni_yasetai % git status
On branch setting
nothing to commit, working tree clean

こんな感じになっています。 今、buranchはsettingなんですけど、mainに移動してgit push heroku mainをおこなったほうがいいですか?

kenchasonakai commented 6 months ago

今、buranchはsettingなんですけど、mainに移動してgit push heroku mainをおこなったほうがいいですか?

見落としてました! これだと変更分がherokuにpushされないので下記のコマンド実行してみてください

git push heroku setting:main
kodamarisa commented 6 months ago

git push heroku setting:mainを行ったところ、下記の結果になりました。 エラーメッセージも見当たらないので、これはデプロイできていると考えて大丈夫ですか?

kodamarisa@kodamarisanoMacBook-Pro osinotameni_yasetai % git push heroku setting:main
Enumerating objects: 146, done.
Counting objects: 100% (146/146), done.
Delta compression using up to 10 threads
Compressing objects: 100% (129/129), done.
Writing objects: 100% (146/146), 168.38 KiB | 11.22 MiB/s, done.
Total 146 (delta 14), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (14/14), done.
remote: Updated 112 paths from de2f60c
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Building on the Heroku-22 stack
remote: -----> Using buildpacks:
remote:        1. heroku/nodejs
remote:        2. heroku/ruby
remote: -----> Node.js app detected
remote:        
remote: -----> Creating runtime environment
remote:        
remote:        NPM_CONFIG_LOGLEVEL=error
remote:        USE_YARN_CACHE=true
remote:        NODE_VERBOSE=false
remote:        NODE_ENV=production
remote:        NODE_MODULES_CACHE=true
remote:        
remote: -----> Installing binaries
remote:        engines.node (package.json):   15.x
remote:        engines.npm (package.json):    unspecified (use default)
remote:        engines.yarn (package.json):   unspecified (use default)
remote:        
remote:        Resolving node version 15.x...
remote:        Downloading and installing node 15.14.0...
remote:        Using default npm version: 7.7.6
remote:        Resolving yarn version 1.22.x...
remote:        Downloading and installing yarn (1.22.22)
remote:        Installed yarn 1.22.22
remote:        
remote: -----> Installing dependencies
remote:        Installing node modules (yarn.lock)
remote:        yarn install v1.22.22
remote:        [1/4] Resolving packages...
remote:        [2/4] Fetching packages...
remote:        [3/4] Linking dependencies...
remote:        warning " > @babel/plugin-proposal-private-property-in-object@7.21.11" has unmet peer dependency "@babel/core@^7.0.0-0".
remote:        warning "@babel/plugin-proposal-private-property-in-object > @babel/helper-create-class-features-plugin@7.24.5" has unmet peer dependency "@babel/core@^7.0.0".
remote:        warning "@babel/plugin-proposal-private-property-in-object > @babel/plugin-syntax-private-property-in-object@7.14.5" has unmet peer dependency "@babel/core@^7.0.0-0".
remote:        warning "@babel/plugin-proposal-private-property-in-object > @babel/helper-create-class-features-plugin > @babel/helper-replace-supers@7.24.1" has unmet peer dependency "@babel/core@^7.0.0".
remote:        warning " > @babel/plugin-proposal-private-methods@7.18.6" has unmet peer dependency "@babel/core@^7.0.0-0".
remote:        [4/4] Building fresh packages...
remote:        Done in 18.07s.
remote:        
remote: -----> Build
remote:        
remote: -----> Pruning devDependencies
remote:        yarn install v1.22.22
remote:        [1/4] Resolving packages...
remote:        [2/4] Fetching packages...
remote:        [3/4] Linking dependencies...
remote:        warning " > @babel/plugin-proposal-private-property-in-object@7.21.11" has unmet peer dependency "@babel/core@^7.0.0-0".
remote:        warning "@babel/plugin-proposal-private-property-in-object > @babel/helper-create-class-features-plugin@7.24.5" has unmet peer dependency "@babel/core@^7.0.0".
remote:        warning "@babel/plugin-proposal-private-property-in-object > @babel/plugin-syntax-private-property-in-object@7.14.5" has unmet peer dependency "@babel/core@^7.0.0-0".
remote:        warning "@babel/plugin-proposal-private-property-in-object > @babel/helper-create-class-features-plugin > @babel/helper-replace-supers@7.24.1" has unmet peer dependency "@babel/core@^7.0.0".
remote:        warning " > @babel/plugin-proposal-private-methods@7.18.6" has unmet peer dependency "@babel/core@^7.0.0-0".
remote:        [4/4] Building fresh packages...
remote:        warning Ignored scripts due to flag.
remote:        Done in 2.37s.
remote:        
remote: -----> Caching build
remote:        - yarn cache
remote:        
remote: -----> Build succeeded!
remote:  !     This app may not specify any way to start a node process
remote:        https://devcenter.heroku.com/articles/nodejs-support#default-web-process-type
remote: 
remote:  !     Unmet dependencies don't fail yarn install but may cause runtime issues
remote:        https://github.com/npm/npm/issues/7494
remote: 
remote: -----> Ruby app detected
remote: -----> Installing bundler 2.3.25
remote: -----> Removing BUNDLED WITH version in the Gemfile.lock
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-3.1.4
remote: -----> Installing dependencies using bundler 2.3.25
remote:        Running: BUNDLE_WITHOUT='development:test' BUNDLE_PATH=vendor/bundle BUNDLE_BIN=vendor/bundle/bin BUNDLE_DEPLOYMENT=1 bundle install -j4
remote:        Fetching gem metadata from https://rubygems.org/..........
remote:        Fetching rake 13.2.1
remote:        Installing rake 13.2.1
remote:        Fetching concurrent-ruby 1.2.3
remote:        Fetching minitest 5.22.3
remote:        Fetching zeitwerk 2.6.13
remote:        Fetching builder 3.2.4
remote:        Installing builder 3.2.4
remote:        Installing minitest 5.22.3
remote:        Installing zeitwerk 2.6.13
remote:        Installing concurrent-ruby 1.2.3
remote:        Fetching erubi 1.12.0
remote:        Fetching racc 1.7.3
remote:        Fetching crass 1.0.6
remote:        Installing erubi 1.12.0
remote:        Fetching rack 2.2.9
remote:        Installing racc 1.7.3 with native extensions
remote:        Installing crass 1.0.6
remote:        Fetching nio4r 2.7.3
remote:        Fetching websocket-extensions 0.1.5
remote:        Installing rack 2.2.9
remote:        Installing nio4r 2.7.3 with native extensions
remote:        Fetching marcel 1.0.4
remote:        Installing websocket-extensions 0.1.5
remote:        Fetching mini_mime 1.1.5
remote:        Installing mini_mime 1.1.5
remote:        Installing marcel 1.0.4
remote:        Fetching date 3.3.4
remote:        Fetching timeout 0.4.1
remote:        Installing date 3.3.4 with native extensions
remote:        Installing timeout 0.4.1
remote:        Fetching msgpack 1.7.2
remote:        Installing msgpack 1.7.2 with native extensions
remote:        Using bundler 2.3.26
remote:        Fetching ffi 1.16.3
remote:        Installing ffi 1.16.3 with native extensions
remote:        Fetching method_source 1.1.0
remote:        Installing method_source 1.1.0
remote:        Fetching pg 1.5.6
remote:        Installing pg 1.5.6 with native extensions
remote:        Fetching thor 1.3.1
remote:        Installing thor 1.3.1
remote:        Fetching tilt 2.3.0
remote:        Installing tilt 2.3.0
remote:        Fetching semantic_range 3.0.0
remote:        Installing semantic_range 3.0.0
remote:        Fetching turbolinks-source 5.2.0
remote:        Installing turbolinks-source 5.2.0
remote:        Fetching i18n 1.14.5
remote:        Installing i18n 1.14.5
remote:        Fetching tzinfo 2.0.6
remote:        Installing tzinfo 2.0.6
remote:        Fetching rack-test 2.1.0
remote:        Installing rack-test 2.1.0
remote:        Fetching rack-proxy 0.7.7
remote:        Installing rack-proxy 0.7.7
remote:        Fetching sprockets 4.2.1
remote:        Installing sprockets 4.2.1
remote:        Fetching websocket-driver 0.7.6
remote:        Installing websocket-driver 0.7.6 with native extensions
remote:        Fetching net-protocol 0.2.2
remote:        Installing net-protocol 0.2.2
remote:        Fetching nokogiri 1.16.4 (x86_64-linux)
remote:        Installing nokogiri 1.16.4 (x86_64-linux)
remote:        Fetching puma 5.6.8
remote:        Installing puma 5.6.8 with native extensions
remote:        Fetching bootsnap 1.18.3
remote:        Installing bootsnap 1.18.3 with native extensions
remote:        Fetching turbolinks 5.2.1
remote:        Installing turbolinks 5.2.1
remote:        Fetching activesupport 6.1.7.7
remote:        Installing activesupport 6.1.7.7
remote:        Fetching net-pop 0.1.2
remote:        Installing net-pop 0.1.2
remote:        Fetching net-smtp 0.5.0
remote:        Installing net-smtp 0.5.0
remote:        Fetching loofah 2.22.0
remote:        Installing loofah 2.22.0
remote:        Fetching net-imap 0.4.11
remote:        Installing net-imap 0.4.11
remote:        Fetching sassc 2.4.0
remote:        Installing sassc 2.4.0 with native extensions
remote:        Fetching rails-dom-testing 2.2.0
remote:        Installing rails-dom-testing 2.2.0
remote:        Fetching globalid 1.2.1
remote:        Installing globalid 1.2.1
remote:        Fetching activemodel 6.1.7.7
remote:        Installing activemodel 6.1.7.7
remote:        Fetching rails-html-sanitizer 1.6.0
remote:        Installing rails-html-sanitizer 1.6.0
remote:        Fetching mail 2.8.1
remote:        Installing mail 2.8.1
remote:        Fetching activejob 6.1.7.7
remote:        Installing activejob 6.1.7.7
remote:        Fetching activerecord 6.1.7.7
remote:        Installing activerecord 6.1.7.7
remote:        Fetching actionview 6.1.7.7
remote:        Installing actionview 6.1.7.7
remote:        Fetching actionpack 6.1.7.7
remote:        Fetching jbuilder 2.12.0
remote:        Installing actionpack 6.1.7.7
remote:        Installing jbuilder 2.12.0
remote:        Fetching actioncable 6.1.7.7
remote:        Fetching activestorage 6.1.7.7
remote:        Installing activestorage 6.1.7.7
remote:        Installing actioncable 6.1.7.7
remote:        Fetching actionmailer 6.1.7.7
remote:        Installing actionmailer 6.1.7.7
remote:        Fetching railties 6.1.7.7
remote:        Fetching sprockets-rails 3.4.2
remote:        Installing sprockets-rails 3.4.2
remote:        Installing railties 6.1.7.7
remote:        Fetching actionmailbox 6.1.7.7
remote:        Installing actionmailbox 6.1.7.7
remote:        Fetching actiontext 6.1.7.7
remote:        Installing actiontext 6.1.7.7
remote:        Fetching rails 6.1.7.7
remote:        Fetching webpacker 5.4.4
remote:        Installing rails 6.1.7.7
remote:        Installing webpacker 5.4.4
remote:        Fetching sassc-rails 2.1.2
remote:        Installing sassc-rails 2.1.2
remote:        Fetching sass-rails 6.0.0
remote:        Installing sass-rails 6.0.0
remote:        Bundle complete! 18 Gemfile dependencies, 62 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 (77.37s)
remote:        Cleaning up the bundler cache.
remote:        Removing bundler (2.3.25)
remote: -----> Detecting rake tasks
remote: -----> Preparing app for Rails asset pipeline
remote:        Running: rake assets:precompile
remote:        yarn install v1.22.22
remote:        [1/5] Validating package.json...
remote:        [2/5] Resolving packages...
remote:        [3/5] Fetching packages...
remote:        [4/5] Linking dependencies...
remote:        warning " > @babel/plugin-proposal-private-property-in-object@7.21.11" has unmet peer dependency "@babel/core@^7.0.0-0".
remote:        warning "@babel/plugin-proposal-private-property-in-object > @babel/helper-create-class-features-plugin@7.24.5" has unmet peer dependency "@babel/core@^7.0.0".
remote:        warning "@babel/plugin-proposal-private-property-in-object > @babel/plugin-syntax-private-property-in-object@7.14.5" has unmet peer dependency "@babel/core@^7.0.0-0".
remote:        warning "@babel/plugin-proposal-private-property-in-object > @babel/helper-create-class-features-plugin > @babel/helper-replace-supers@7.24.1" has unmet peer dependency "@babel/core@^7.0.0".
remote:        warning " > @babel/plugin-proposal-private-methods@7.18.6" has unmet peer dependency "@babel/core@^7.0.0-0".
remote:        [5/5] Building fresh packages...
remote:        Done in 16.41s.
remote:        I, [2024-05-14T09:52:01.822126 #3015]  INFO -- : Writing /tmp/build_139d6305/public/assets/manifest-b4bf6e57a53c2bdb55b8998cc94cd00883793c1c37c5e5aea3ef6749b4f6d92b.js
remote:        I, [2024-05-14T09:52:01.822425 #3015]  INFO -- : Writing /tmp/build_139d6305/public/assets/manifest-b4bf6e57a53c2bdb55b8998cc94cd00883793c1c37c5e5aea3ef6749b4f6d92b.js.gz
remote:        I, [2024-05-14T09:52:01.822589 #3015]  INFO -- : Writing /tmp/build_139d6305/public/assets/application-04c3ae28f07e1bf734223bf526d0cdd296440ef53bcb3f80b9f093c6bf02f747.css
remote:        I, [2024-05-14T09:52:01.822673 #3015]  INFO -- : Writing /tmp/build_139d6305/public/assets/application-04c3ae28f07e1bf734223bf526d0cdd296440ef53bcb3f80b9f093c6bf02f747.css.gz
remote:        I, [2024-05-14T09:52:01.822772 #3015]  INFO -- : Writing /tmp/build_139d6305/public/assets/boards-04024382391bb910584145d8113cf35ef376b55d125bb4516cebeb14ce788597.css
remote:        I, [2024-05-14T09:52:01.822852 #3015]  INFO -- : Writing /tmp/build_139d6305/public/assets/boards-04024382391bb910584145d8113cf35ef376b55d125bb4516cebeb14ce788597.css.gz
remote:        I, [2024-05-14T09:52:01.823072 #3015]  INFO -- : Writing /tmp/build_139d6305/public/assets/scaffolds-04c3ae28f07e1bf734223bf526d0cdd296440ef53bcb3f80b9f093c6bf02f747.css
remote:        I, [2024-05-14T09:52:01.823295 #3015]  INFO -- : Writing /tmp/build_139d6305/public/assets/scaffolds-04c3ae28f07e1bf734223bf526d0cdd296440ef53bcb3f80b9f093c6bf02f747.css.gz
remote:        Warning: you are using an unstable release of Node.js (v15.14.0). If you encounter issues with Node.js, consider switching to an Active LTS release. More info: https://docs.npmjs.com/try-the-latest-stable-version-of-node
remote:        Compiling...
remote:        Compiled all packs in /tmp/build_139d6305/public/packs
remote:        Hash: e8d489246f81a49a59c1
remote:        Version: webpack 4.47.0
remote:        Time: 3452ms
remote:        Built at: 05/14/2024 9:52:06 AM
remote:                                                Asset       Size  Chunks                         Chunk Names
remote:               js/application-90bff605a2443263602b.js   68.2 KiB       0  [emitted] [immutable]  application
remote:            js/application-90bff605a2443263602b.js.br   15.2 KiB          [emitted]              
remote:            js/application-90bff605a2443263602b.js.gz   17.5 KiB          [emitted]              
remote:           js/application-90bff605a2443263602b.js.map    203 KiB       0  [emitted] [dev]        application
remote:        js/application-90bff605a2443263602b.js.map.br   43.2 KiB          [emitted]              
remote:        js/application-90bff605a2443263602b.js.map.gz   49.9 KiB          [emitted]              
remote:                                        manifest.json  364 bytes          [emitted]              
remote:                                     manifest.json.br  128 bytes          [emitted]              
remote:                                     manifest.json.gz  142 bytes          [emitted]              
remote:        Entrypoint application = js/application-90bff605a2443263602b.js js/application-90bff605a2443263602b.js.map
remote:        [3] ./app/javascript/packs/application.js 480 bytes {0} [built]
remote:        [4] ./app/javascript/channels/index.js 205 bytes {0} [built]
remote:        [5] ./app/javascript/channels sync _channel\.js$ 160 bytes {0} [built]
remote:            + 3 hidden modules
remote:        
remote:        Asset precompilation completed (22.81s)
remote:        Cleaning assets
remote:        Running: rake assets:clean
remote:        Warning: you are using an unstable release of Node.js (v15.14.0). If you encounter issues with Node.js, consider switching to an Active LTS release. More info: https://docs.npmjs.com/try-the-latest-stable-version-of-node
remote: -----> Detecting rails configuration
remote: 
remote: ###### WARNING:
remote: 
remote:        There is a more recent Ruby version available for you to use:
remote:        
remote:        3.1.5
remote:        
remote:        The latest version will include security and bug fixes. We always recommend
remote:        running the latest version of your minor release.
remote:        
remote:        Please upgrade your Ruby version.
remote:        
remote:        For all available Ruby versions see:
remote:          https://devcenter.heroku.com/articles/ruby-support#supported-runtimes
remote: 
remote: ###### WARNING:
remote: 
remote:        No Procfile detected, using the default web server.
remote:        We recommend explicitly declaring how to boot your server process via a Procfile.
remote:        https://devcenter.heroku.com/articles/ruby-default-web-server
remote: 
remote: 
remote: -----> Discovering process types
remote:        Procfile declares types     -> (none)
remote:        Default types for buildpack -> console, rake, web
remote: 
remote: -----> Compressing...
remote:        Done: 98.4M
remote: -----> Launching...
remote:        Released v4
remote:        https://osinotameni-yasetai-8b5c48625703.herokuapp.com/ deployed to Heroku
remote: 
remote: Verifying deploy... done.
To https://git.heroku.com/osinotameni-yasetai.git
 * [new branch]      setting -> main
kenchasonakai commented 6 months ago

デプロイできてそうですね!