'error未找到命令“webpack”,'在Rails应用程序的Heroku部署中

x4shl7ld  于 2022-11-13  发布在  Webpack
关注(0)|答案(2)|浏览(142)

我在Heroku上部署Rails应用程序时遇到了困难。我看过很多类似的帖子,但没有一个建议的解决方案对我有效。错误和警告包括:
1.编译失败:Yarn运行v1.22.17 info访问https://yarnpkg.com/en/docs/cli/run获取有关此命令的文档。(注意我的Yarn版本是v.1.22.15)
1.警告包.json:无许可证字段
1.错误:未找到命令“webpack”。
1.先行编译资产失败。
下面是我尝试推送的全部结果:

% git push heroku main                  
Enumerating objects: 300, done.
Counting objects: 100% (300/300), done.
Delta compression using up to 4 threads
Compressing objects: 100% (263/263), done.
Writing objects: 100% (300/300), 466.88 KiB | 6.31 MiB/s, done.
Total 300 (delta 101), reused 0 (delta 0), pack-reused 0
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Building on the Heroku-20 stack
remote: -----> Using buildpacks:
remote:        1. heroku/ruby
remote:        2. heroku/nodejs
remote: -----> Ruby app detected
remote: -----> Installing bundler 2.3.10
remote: -----> Removing BUNDLED WITH version in the Gemfile.lock
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-3.0.3
remote: -----> Installing dependencies using bundler 2.3.10
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.0.6
remote:        Installing rake 13.0.6
remote:        Fetching concurrent-ruby 1.1.10
remote:        Fetching minitest 5.15.0
remote:        Fetching erubi 1.10.0
remote:        Fetching builder 3.2.4
remote:        Installing erubi 1.10.0
remote:        Installing minitest 5.15.0
remote:        Installing builder 3.2.4
remote:        Installing concurrent-ruby 1.1.10
remote:        Fetching racc 1.6.0
remote:        Installing racc 1.6.0 with native extensions
remote:        Fetching crass 1.0.6
remote:        Installing crass 1.0.6
remote:        Fetching rack 2.2.3
remote:        Fetching nio4r 2.5.8
remote:        Installing nio4r 2.5.8 with native extensions
remote:        Installing rack 2.2.3
remote:        Fetching websocket-extensions 0.1.5
remote:        Fetching marcel 1.0.2
remote:        Installing websocket-extensions 0.1.5
remote:        Fetching mini_mime 1.1.2
remote:        Installing mini_mime 1.1.2
remote:        Installing marcel 1.0.2
remote:        Fetching digest 3.1.0
remote:        Fetching timeout 0.2.0
remote:        Installing timeout 0.2.0
remote:        Installing digest 3.1.0 with native extensions
remote:        Using strscan 3.0.1
remote:        Fetching babel-source 5.8.35
remote:        Installing babel-source 5.8.35
remote:        Fetching execjs 2.8.1
remote:        Installing execjs 2.8.1
remote:        Fetching bcrypt 3.1.17
remote:        Installing bcrypt 3.1.17 with native extensions
remote:        Fetching msgpack 1.5.1
remote:        Installing msgpack 1.5.1 with native extensions
remote:        Using bundler 2.3.10
remote:        Fetching connection_pool 2.2.5
remote:        Installing connection_pool 2.2.5
remote:        Fetching method_source 1.0.0
remote:        Installing method_source 1.0.0
remote:        Fetching thor 1.2.1
remote:        Installing thor 1.2.1
remote:        Fetching zeitwerk 2.5.4
remote:        Installing zeitwerk 2.5.4
remote:        Fetching pg 1.3.5
remote:        Installing pg 1.3.5 with native extensions
remote:        Fetching rails_serve_static_assets 0.0.5
remote:        Installing rails_serve_static_assets 0.0.5
remote:        Fetching rails_stdout_logging 0.0.5
remote:        Installing rails_stdout_logging 0.0.5
remote:        Fetching tilt 2.0.10
remote:        Installing tilt 2.0.10
remote:        Fetching semantic_range 3.0.0
remote:        Installing semantic_range 3.0.0
remote:        Fetching i18n 1.10.0
remote:        Installing i18n 1.10.0
remote:        Fetching tzinfo 2.0.4
remote:        Installing tzinfo 2.0.4
remote:        Fetching rack-test 1.1.0
remote:        Installing rack-test 1.1.0
remote:        Fetching rack-proxy 0.7.2
remote:        Installing rack-proxy 0.7.2
remote:        Fetching sprockets 4.0.3
remote:        Installing sprockets 4.0.3
remote:        Fetching websocket-driver 0.7.5
remote:        Installing websocket-driver 0.7.5 with native extensions
remote:        Fetching mail 2.7.1
remote:        Installing mail 2.7.1
remote:        Fetching net-protocol 0.1.3
remote:        Installing net-protocol 0.1.3
remote:        Fetching babel-transpiler 0.7.0
remote:        Installing babel-transpiler 0.7.0
remote:        Fetching nokogiri 1.13.4 (x86_64-linux)
remote:        Fetching puma 5.6.4
remote:        Installing puma 5.6.4 with native extensions
remote:        Installing nokogiri 1.13.4 (x86_64-linux)
remote:        Fetching rails_12factor 0.0.3
remote:        Installing rails_12factor 0.0.3
remote:        Fetching activesupport 7.0.2.3
remote:        Installing activesupport 7.0.2.3
remote:        Fetching net-imap 0.2.3
remote:        Installing net-imap 0.2.3
remote:        Using net-pop 0.1.1
remote:        Fetching net-smtp 0.3.1
remote:        Installing net-smtp 0.3.1
remote:        Fetching loofah 2.16.0
remote:        Installing loofah 2.16.0
remote:        Fetching rails-dom-testing 2.0.3
remote:        Installing rails-dom-testing 2.0.3
remote:        Fetching globalid 1.0.0
remote:        Installing globalid 1.0.0
remote:        Fetching activemodel 7.0.2.3
remote:        Installing activemodel 7.0.2.3
remote:        Fetching rails-html-sanitizer 1.4.2
remote:        Installing rails-html-sanitizer 1.4.2
remote:        Fetching activejob 7.0.2.3
remote:        Installing activejob 7.0.2.3
remote:        Fetching activerecord 7.0.2.3
remote:        Installing activerecord 7.0.2.3
remote:        Fetching actionview 7.0.2.3
remote:        Installing actionview 7.0.2.3
remote:        Fetching actionpack 7.0.2.3
remote:        Installing actionpack 7.0.2.3
remote:        Fetching jbuilder 2.11.5
remote:        Installing jbuilder 2.11.5
remote:        Fetching actioncable 7.0.2.3
remote:        Fetching activestorage 7.0.2.3
remote:        Installing actioncable 7.0.2.3
remote:        Installing activestorage 7.0.2.3
remote:        Fetching actionmailer 7.0.2.3
remote:        Installing actionmailer 7.0.2.3
remote:        Fetching railties 7.0.2.3
remote:        Fetching sprockets-rails 3.4.2
remote:        Installing railties 7.0.2.3
remote:        Installing sprockets-rails 3.4.2
remote:        Fetching bootsnap 1.11.1
remote:        Installing bootsnap 1.11.1 with native extensions
remote:        Fetching actionmailbox 7.0.2.3
remote:        Installing actionmailbox 7.0.2.3
remote:        Fetching actiontext 7.0.2.3
remote:        Installing actiontext 7.0.2.3
remote:        Fetching importmap-rails 1.0.3
remote:        Installing importmap-rails 1.0.3
remote:        Fetching react-rails 2.6.2
remote:        Installing react-rails 2.6.2
remote:        Fetching stimulus-rails 1.0.4
remote:        Installing stimulus-rails 1.0.4
remote:        Fetching turbo-rails 1.0.1
remote:        Installing turbo-rails 1.0.1
remote:        Fetching webpacker 5.4.3
remote:        Installing webpacker 5.4.3
remote:        Fetching rails 7.0.2.3
remote:        Installing rails 7.0.2.3
remote:        Bundle complete! 19 Gemfile dependencies, 69 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 (23.81s)
remote:        Cleaning up the bundler cache.
remote: -----> Installing node-v16.13.1-linux-x64
remote: -----> Installing yarn-v1.22.17
remote: -----> Detecting rake tasks
remote: -----> Preparing app for Rails asset pipeline
remote:        Running: rake assets:precompile
remote:        I, [2022-05-02T23:22:44.707210 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/manifest-5a134ae726a0585ae432d50dd7d3adf604e9c8025face759bacddd4c9d620ef4.js
remote:        I, [2022-05-02T23:22:44.707399 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/manifest-5a134ae726a0585ae432d50dd7d3adf604e9c8025face759bacddd4c9d620ef4.js.gz
remote:        I, [2022-05-02T23:22:44.707525 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/quintilianus-f90b395683cee4fd07481e92f84841e4f1bd680e9b05cb5a7d683e3cd4253b6a.jpg
remote:        I, [2022-05-02T23:22:44.707697 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/verble-12c425432d46e129bcfe732afe4a3258ba1d047b2bb1a5ebcd3f056becfc03b5.png
remote:        I, [2022-05-02T23:22:44.707907 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/verble2-3985c69f006de839c5204a0cbbd2e49d69259a6f10284c59e3b24ff72e0d7691.png
remote:        I, [2022-05-02T23:22:44.708106 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/application-515b4c0cba1ea46ef3692658aed524a1b7bb9dd46eda2e6f31bc44b928d5c27d.css
remote:        I, [2022-05-02T23:22:44.708180 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/application-515b4c0cba1ea46ef3692658aed524a1b7bb9dd46eda2e6f31bc44b928d5c27d.css.gz
remote:        I, [2022-05-02T23:22:44.708275 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/application-7edc5389077d017f23c5c62bac12a7a40017ff3c1b299e3ecfd02fdf02d0d086.js
remote:        I, [2022-05-02T23:22:44.708338 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/application-7edc5389077d017f23c5c62bac12a7a40017ff3c1b299e3ecfd02fdf02d0d086.js.gz
remote:        I, [2022-05-02T23:22:44.708429 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/controllers/application-914a764c7785706470b5f3876c3df8b86dd4490b83fe424d8456206abc3ed716.js
remote:        I, [2022-05-02T23:22:44.708491 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/controllers/application-914a764c7785706470b5f3876c3df8b86dd4490b83fe424d8456206abc3ed716.js.gz
remote:        I, [2022-05-02T23:22:44.708580 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/controllers/hello_controller-ecef856dd977ae19760651575ada9edf8b57682246e83d342ca7e5db239f1146.js
remote:        I, [2022-05-02T23:22:44.708641 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/controllers/hello_controller-ecef856dd977ae19760651575ada9edf8b57682246e83d342ca7e5db239f1146.js.g
remote:        I, [2022-05-02T23:22:44.708888 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/controllers/index-0ccb3cf9bd273425c130368d4bffa05d2b03aeedcfcf63ea17761d4d326e6974.js
remote:        I, [2022-05-02T23:22:44.708958 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/controllers/index-0ccb3cf9bd273425c130368d4bffa05d2b03aeedcfcf63ea17761d4d326e6974.js.gz
remote:        I, [2022-05-02T23:22:44.709048 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/packs/application-02ca446f304de55f1dc5774ad069b60e3bf8d8a1bfa946989acb811391adfd38.js
remote:        I, [2022-05-02T23:22:44.709110 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/packs/application-02ca446f304de55f1dc5774ad069b60e3bf8d8a1bfa946989acb811391adfd38.js.gz
remote:        I, [2022-05-02T23:22:44.709198 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/packs/hello_react-97e4b1a5d6f289b924f1451cc03b66c31e506092f9a76f5c732874aad6420974.js
remote:        I, [2022-05-02T23:22:44.709261 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/packs/hello_react-97e4b1a5d6f289b924f1451cc03b66c31e506092f9a76f5c732874aad6420974.js.gz
remote:        I, [2022-05-02T23:22:44.709347 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/packs/server_rendering-2a24127df52e362eb9b5b519d709ac36d78957d15dcdbdcf46ac139797332d2e.js
remote:        I, [2022-05-02T23:22:44.709408 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/packs/server_rendering-2a24127df52e362eb9b5b519d709ac36d78957d15dcdbdcf46ac139797332d2e.js.gz
remote:        I, [2022-05-02T23:22:44.709494 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/src/App-80cfb33ec66aa63238a98bf78dc7db83ca963486dfb33de72e0a1b27e05b8e2e.js
remote:        I, [2022-05-02T23:22:44.709557 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/src/App-80cfb33ec66aa63238a98bf78dc7db83ca963486dfb33de72e0a1b27e05b8e2e.js.gz
remote:        I, [2022-05-02T23:22:44.709643 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/src/App.test-eb6babbdd4c048c9e40877409a46b3a1923af7e204114276faca30751f768457.js
remote:        I, [2022-05-02T23:22:44.709718 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/src/App.test-eb6babbdd4c048c9e40877409a46b3a1923af7e204114276faca30751f768457.js.gz
remote:        I, [2022-05-02T23:22:44.709809 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/src/index-47cad1fcd55b76a14d9937d6ef66dda0ec20e353dc7984676e903b1d92a0c364.js
remote:        I, [2022-05-02T23:22:44.709871 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/src/index-47cad1fcd55b76a14d9937d6ef66dda0ec20e353dc7984676e903b1d92a0c364.js.gz
remote:        I, [2022-05-02T23:22:44.710323 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/src/reportWebVitals-0a0cf7c7538a2dec87ccf9df42420cfcde8009fe2088b71e88962ddbb77edea5.js
remote:        I, [2022-05-02T23:22:44.710438 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/src/reportWebVitals-0a0cf7c7538a2dec87ccf9df42420cfcde8009fe2088b71e88962ddbb77edea5.js.gz
remote:        I, [2022-05-02T23:22:44.710569 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/src/setupTests-e56b89ee2a89f3b5a890159d077da34d588b514fda59bb0d60a18d9a59c16d1c.js
remote:        I, [2022-05-02T23:22:44.710695 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/src/setupTests-e56b89ee2a89f3b5a890159d077da34d588b514fda59bb0d60a18d9a59c16d1c.js.gz
remote:        I, [2022-05-02T23:22:44.710823 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/turbo-17ee4157bcb24be2ddf2a377f4e2974ebe4f2d63d53ba8bb795539ac16f6b5ac.js
remote:        I, [2022-05-02T23:22:44.710920 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/turbo-17ee4157bcb24be2ddf2a377f4e2974ebe4f2d63d53ba8bb795539ac16f6b5ac.js.gz
remote:        I, [2022-05-02T23:22:44.711043 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/turbo.min-161ca168552628ced6fde9d342c7ceaa95ac2ccc00ad21e5506c409e1c02e189.js
remote:        I, [2022-05-02T23:22:44.711140 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/turbo.min-161ca168552628ced6fde9d342c7ceaa95ac2ccc00ad21e5506c409e1c02e189.js.gz
remote:        I, [2022-05-02T23:22:44.711267 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/turbo.min.js-7040a72cd713dc85e740d5e522f9427a8305c66fb229490fa2b2858d6f4d170d.map
remote:        I, [2022-05-02T23:22:44.711530 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/actiontext-071548ce29ea738dde3be4a959a98b3307ae3747c2868e1396932de3f5fbd934.js
remote:        I, [2022-05-02T23:22:44.711727 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/actiontext-071548ce29ea738dde3be4a959a98b3307ae3747c2868e1396932de3f5fbd934.js.gz
remote:        I, [2022-05-02T23:22:44.711859 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/trix-144c56f0342b00e40555cd6b609d5a2af1ef8c771ec6a8d654e9d35b2e3094ef.js
remote:        I, [2022-05-02T23:22:44.711954 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/trix-144c56f0342b00e40555cd6b609d5a2af1ef8c771ec6a8d654e9d35b2e3094ef.js.gz
remote:        I, [2022-05-02T23:22:44.712077 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/trix-d0e9a1f50a630da223bef354dbef3a2f8cd6c42e8899ff8c38760b580c43956a.css
remote:        I, [2022-05-02T23:22:44.712335 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/trix-d0e9a1f50a630da223bef354dbef3a2f8cd6c42e8899ff8c38760b580c43956a.css.gz
remote:        I, [2022-05-02T23:22:44.712476 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/es-module-shims-a042be24d6c7610af5f22de9a77f995bdfe6ecbced2424a989e7c2afd4b7d3cc.js
remote:        I, [2022-05-02T23:22:44.712577 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/es-module-shims-a042be24d6c7610af5f22de9a77f995bdfe6ecbced2424a989e7c2afd4b7d3cc.js.gz
remote:        I, [2022-05-02T23:22:44.712702 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/es-module-shims.min-5e3751d1eb34a7e222914655c679c4014483d82a12e427f0c4884b5d2a994258.js
remote:        I, [2022-05-02T23:22:44.712800 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/es-module-shims.min-5e3751d1eb34a7e222914655c679c4014483d82a12e427f0c4884b5d2a994258.js.gz
remote:        I, [2022-05-02T23:22:44.712925 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/es-module-shims.js-554414527cfd821a3bed29ab778af8d45c7a0669981593e1053b3183afc70795.map
remote:        I, [2022-05-02T23:22:44.713160 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/stimulus-f2cec5b460534f94c27d39d055bcef87257b23e0e9d3966a868a0128036da6cf.js
remote:        I, [2022-05-02T23:22:44.713272 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/stimulus-f2cec5b460534f94c27d39d055bcef87257b23e0e9d3966a868a0128036da6cf.js.gz
remote:        I, [2022-05-02T23:22:44.713404 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/stimulus-autoloader-df87cc31073d49fd05ce686e11f7030e9e5edb64a3d8d37844e49caafd92d7a5.js
remote:        I, [2022-05-02T23:22:44.713502 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/stimulus-autoloader-df87cc31073d49fd05ce686e11f7030e9e5edb64a3d8d37844e49caafd92d7a5.js.gz
remote:        I, [2022-05-02T23:22:44.713640 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/stimulus-importmap-autoloader-475f243b8d3fab661503c4351f4fe2a364a85a60b823c669040b6e3628230296.js
remote:        I, [2022-05-02T23:22:44.713750 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/stimulus-importmap-autoloader-475f243b8d3fab661503c4351f4fe2a364a85a60b823c669040b6e3628230296.js.gz
remote:        I, [2022-05-02T23:22:44.713877 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/stimulus-loading-c0a9ab3f50e3a8c90c9fb522caf778ed8af371ef0e6e526b3346625c160f46ea.js
remote:        I, [2022-05-02T23:22:44.715881 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/stimulus-loading-c0a9ab3f50e3a8c90c9fb522caf778ed8af371ef0e6e526b3346625c160f46ea.js.gz
remote:        I, [2022-05-02T23:22:44.716054 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/stimulus.min-4e2884d463cba2c0f9b279dab5a752405f524e1a27408379499739d1e86e1821.js
remote:        I, [2022-05-02T23:22:44.716165 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/stimulus.min-4e2884d463cba2c0f9b279dab5a752405f524e1a27408379499739d1e86e1821.js.gz
remote:        I, [2022-05-02T23:22:44.716296 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/stimulus-autoloader-df87cc31073d49fd05ce686e11f7030e9e5edb64a3d8d37844e49caafd92d7a5.js
remote:        I, [2022-05-02T23:22:44.716398 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/stimulus-autoloader-df87cc31073d49fd05ce686e11f7030e9e5edb64a3d8d37844e49caafd92d7a5.js.gz
remote:        I, [2022-05-02T23:22:44.716741 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/stimulus-importmap-autoloader-475f243b8d3fab661503c4351f4fe2a364a85a60b823c669040b6e3628230296.js
remote:        I, [2022-05-02T23:22:44.716860 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/stimulus-importmap-autoloader-475f243b8d3fab661503c4351f4fe2a364a85a60b823c669040b6e3628230296.js.gz
remote:        I, [2022-05-02T23:22:44.716989 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/stimulus-loading-c0a9ab3f50e3a8c90c9fb522caf778ed8af371ef0e6e526b3346625c160f46ea.js
remote:        I, [2022-05-02T23:22:44.717086 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/stimulus-loading-c0a9ab3f50e3a8c90c9fb522caf778ed8af371ef0e6e526b3346625c160f46ea.js.gz
remote:        I, [2022-05-02T23:22:44.717213 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/stimulus.min.js-9cdb2c5e61d81af513011df26b389a7610c27b4be68d9cd51945f575d0482815.map
remote:        I, [2022-05-02T23:22:44.717491 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/activestorage-fc7ac5e4e2b0b6838ccc70b1bba7ad4b986b750a5aa7be605903b519e27c44bb.js
remote:        I, [2022-05-02T23:22:44.717612 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/activestorage-fc7ac5e4e2b0b6838ccc70b1bba7ad4b986b750a5aa7be605903b519e27c44bb.js.gz
remote:        I, [2022-05-02T23:22:44.717760 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/activestorage.esm-c297005f7a00b69930ae2cd087131b0d161285b848ef0708cf12b34e223a6a7c.js
remote:        I, [2022-05-02T23:22:44.718680 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/activestorage.esm-c297005f7a00b69930ae2cd087131b0d161285b848ef0708cf12b34e223a6a7c.js.gz
remote:        I, [2022-05-02T23:22:44.718851 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/actioncable-2d166206803f9bc7591b9e0a2166a95544b15cad2747020ee4306c4c690f7c0b.js
remote:        I, [2022-05-02T23:22:44.718958 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/actioncable-2d166206803f9bc7591b9e0a2166a95544b15cad2747020ee4306c4c690f7c0b.js.gz
remote:        I, [2022-05-02T23:22:44.719087 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/actioncable.esm-7fe096f2e4e1ab306c11c622470583469578d1ad66a5e368eebc42c785e84f2f.js
remote:        I, [2022-05-02T23:22:44.719199 #994]  INFO -- : Writing /tmp/build_3387c0b2/public/assets/actioncable.esm-7fe096f2e4e1ab306c11c622470583469578d1ad66a5e368eebc42c785e84f2f.js.gz
remote:        Compiling...
remote:        Compilation failed:
remote:        yarn run v1.22.17
remote:        info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
remote:        
remote:        
remote:        warning package.json: No license field
remote:        warning package.json: No license field
remote:        error Command "webpack" not found.
remote:        
remote: 
remote:  !
remote:  !     Precompiling assets failed.
remote:  !
remote:  !     Push rejected, failed to compile Ruby app.
remote: 
remote:  !     Push failed
remote:  !
remote:  ! ## Warning - The same version of this code has already been built: bed30831722eef6543169111ec958ab20bb3e6af
remote:  !
remote:  ! We have detected that you have triggered a build from source code with version bed30831722eef6543169111ec958ab20bb3e6af
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 boiling-bayou-87598.
remote: 
To https://git.heroku.com/boiling-bayou-87598.git
 ! [remote rejected] main -> main (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/boiling-bayou-87598.git'
5lhxktic

5lhxktic1#

添加这些构建包,然后再次重新启动您的应用:

heroku buildpacks:add --index 1 heroku/nodejs
heroku buildpacks:add --index 2 heroku/ruby
7qhs6swi

7qhs6swi2#

我在尝试部署我的rails应用程序时也遇到了这个错误。我只是在我的终端上使用了以下代码来克服这个错误,并能够部署我的rails应用程序。
heroku addons:create heroku-postgresql:hobby-dev
heroku buildpacks:add heroku/nodejs
heroku buildpacks:add heroku/ruby
git push heroku master
check out this link for more info

相关问题