Я недавно пытался интегрировать реагирование в мое ранее существующее приложение rails, используя гем webpacker.Когда я пытаюсь нажать на heroku, я вижу сообщение об ошибке вроде
remote: [1/5] Validating package.json...
remote: [2/5] Resolving packages...
remote: [3/5] Fetching packages...
remote: [4/5] Linking dependencies...
remote: [5/5] Building fresh packages...
remote: success Saved lockfile.
remote: Done in 0.09s.
remote: Compiling…
remote: Compilation failed:
remote: error Command "webpack" not found.
remote:
remote: yarn run v1.12.3
remote: info Visit https://yarnpkg.com/en/docs/cli/run for
documentation about this command.
remote:
remote:
remote: !
remote: ! Precompiling assets failed.
remote: !
remote: ! Push rejected, failed to compile Ruby app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to spitball-production.
remote:
To https://git.heroku.com/spitball-production.git
! [remote rejected] master -> master (pre-receive hook declined)
Мой package.json выглядит как
{
"name": "Spitball",
"private": true,
"dependencies": {
},
"engines": {
"yarn": ">=0.25.2"
}
}
Я пробовал решения, включающие добавление buildpack-пакетов и установкупряжа и webpacker и пока ничего не помогло.Я ожидаю, что все пройдет без проблем, так как все, что я сделал, это добавил гем webpacker.