Failed deploying rails app with webpacker to heroku

岁酱吖の 提交于 2019-12-13 03:24:33

问题


Environment

  • Rails 5.1.5
  • webpack 3.11.0

Error message

remote:        Webpacker is installed 🎉 🍰
remote:        Using /tmp/build_a60546bb726d2fa7f4b8b4ac052f461e/config/webpacker.yml file for setting up webpack paths
remote:        Compiling…
remote:        Compilation failed:
remote:        bundler: failed to load command: webpack (/tmp/build_a60546bb726d2fa7f4b8b4ac052f461e/vendor/bundle/ruby/2.3.0/bin/webpack)
remote:        Errno::ENOENT: No such file or directory - /tmp/build_a60546bb726d2fa7f4b8b4ac052f461e/node_modules/.bin/webpack

回答1:


Solution

heroku buildpacks:clear
heroku buildpacks:set heroku/nodejs
heroku buildpacks:add heroku/ruby

Links

  • https://github.com/rails/webpacker/issues/739
  • https://github.com/rails/webpacker/issues/1282
  • https://github.com/heroku/heroku-buildpack-ruby/issues/712


来源:https://stackoverflow.com/questions/49933431/failed-deploying-rails-app-with-webpacker-to-heroku

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!