我的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
安装herokunodejs heroku buildpack。