ruby-on-rails - Heroku 构建失败找不到 webpack
问题描述
我的 Rails 6 heroku build 似乎找不到 webpack 的副本。我不小心添加/tmp
了.slugignore
我认为是导致此问题的原因,但我不明白为什么。从那以后我已经删除/tmp
了,.slugignore
但问题仍然存在。该应用程序多年来一直运行良好。就像我一直依赖旧的 webpack 一样?但是/tmp
当heroku构建开始时应该是空的吗?对此非常困惑。我从未使用过任何节点或 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
解决方案
安装 heroku/nodejs heroku buildpack。
推荐阅读
- javascript - 有效负载内容长度大于允许的最大值:1048576 - Axios (Electron) 和 nodeJS
- c++ - 检查默认删除的函数模板是否明确专门用于特定类型?
- python - Python 请求响应以 JSON 格式打印 U' 被添加到结果中
- jenkins - JenkinsFile block access to Shared Library Code
- c# - .exe 依赖项找不到 .dll
- kotlin - Kotlin 数组切片索引
- python - How to make pie chart with optimized code?
- powershell - Import-CSV doesn't load the file
- laravel - Laravel + Vue 教程,无法正常工作
- handlebars.js - Can a handlebars partial result be used as a helper's argument?