Heroku构建失败,找不到webpack。

问题描述 投票:0回答:1

我的Rails 6 heroku构建似乎找不到webpack的副本。我不小心添加了 /tmp.slugignore 我相信是这个问题的原因,但我不明白为什么。我已经删除了 /tmp.slugignore 但问题依然存在。这个app已经建设好多年了。就像我一直在依赖一个老的webpack?但是 /tmp 当heroku构建开始时应该是空的?这个问题让我很困惑。我从来没有使用过任何node或webpack的heroku buildpacks,但也许我应该使用。

这里是错误的快照。

-----> Preparing app for Rails asset pipeline
   Running: rake assets:precompile
   /tmp/build_6ab5739c16c73857f5e476d061484644/vendor/bundle/ruby/2.7.0/gems/activerecord-5.2.4.3/lib/active_record/type.rb:27: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
   /tmp/build_6ab5739c16c73857f5e476d061484644/vendor/bundle/ruby/2.7.0/gems/activerecord-5.2.4.3/lib/active_record/type/adapter_specific_registry.rb:9: warning: The called method `add_modifier' is defined here
   /tmp/build_6ab5739c16c73857f5e476d061484644/vendor/bundle/ruby/2.7.0/gems/actionpack-5.2.4.3/lib/action_dispatch/middleware/stack.rb:37: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
   /tmp/build_6ab5739c16c73857f5e476d061484644/vendor/bundle/ruby/2.7.0/gems/actionpack-5.2.4.3/lib/action_dispatch/middleware/static.rb:111: warning: The called method `initialize' is defined here
   /tmp/build_6ab5739c16c73857f5e476d061484644/vendor/bundle/ruby/2.7.0/gems/actionpack-5.2.4.3/lib/action_dispatch/middleware/stack.rb:37: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
   /tmp/build_6ab5739c16c73857f5e476d061484644/vendor/bundle/ruby/2.7.0/gems/actionpack-5.2.4.3/lib/action_dispatch/middleware/ssl.rb:59: warning: The called method `initialize' is defined here
   yarn install v1.16.0
   [1/5] Validating package.json...
   error @1.7.0: The engine "node" is incompatible with this module. Expected version ">=14.0.0". Got "10.15.3"
   error Found incompatible module.
   info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
   autoprefixer: /tmp/build_6ab5739c16c73857f5e476d061484644/app/assets/stylesheets/application.css.scss:5944:5: Gradient has outdated direction syntax. New syntax is like `to left` instead of `right`.
   autoprefixer: /tmp/build_6ab5739c16c73857f5e476d061484644/app/assets/stylesheets/application.css.scss:9297:5: Gradient has outdated direction syntax. New syntax is like `to left` instead of `right`.
   Compiling...
   Compilation failed:
   sh: 1: /tmp/build_6ab5739c16c73857f5e476d061484644/node_modules/.bin/webpack: not found
ruby-on-rails heroku webpack webpacker
1个回答
0
投票

安装herokunodejs heroku buildpack。

© www.soinside.com 2019 - 2024. All rights reserved.