My Rails 6 heroku build似乎找不到webpack的副本。我不小心将/tmp
添加到.slugignore
我认为这是导致此问题的原因,但我不明白为什么。我已经从.slugignore
中删除了/tmp
,但问题仍然存在。该应用程序多年来一直构建良好。就像我一直依赖旧的网络包一样?但是当 heroku 构建开始时,/tmp
应该是空的?对此非常困惑。我从未使用过任何节点或 webpack heroku 构建包,但也许我应该使用?
以下是错误的快照:
-----> 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
安装 heroku/nodejs heroku buildpack。