{"action":"created","issue":{"url":"https://api.github.com/repos/rails/webpacker/issues/532","repository_url":"https://api.github.com/repos/rails/webpacker","labels_url":"https://api.github.com/repos/rails/webpacker/issues/532/labels{/name}","comments_url":"https://api.github.com/repos/rails/webpacker/issues/532/comments","events_url":"https://api.github.com/repos/rails/webpacker/issues/532/events","html_url":"https://github.com/rails/webpacker/issues/532","id":237945732,"number":532,"title":"ActionView::Template::Error (Can't find sales.js in /app/public/packs/manifest.json. Is webpack still compiling?)","user":{"login":"amingilani","id":1188552,"avatar_url":"https://avatars0.githubusercontent.com/u/1188552?v=4","gravatar_id":"","url":"https://api.github.com/users/amingilani","html_url":"https://github.com/amingilani","followers_url":"https://api.github.com/users/amingilani/followers","following_url":"https://api.github.com/users/amingilani/following{/other_user}","gists_url":"https://api.github.com/users/amingilani/gists{/gist_id}","starred_url":"https://api.github.com/users/amingilani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amingilani/subscriptions","organizations_url":"https://api.github.com/users/amingilani/orgs","repos_url":"https://api.github.com/users/amingilani/repos","events_url":"https://api.github.com/users/amingilani/events{/privacy}","received_events_url":"https://api.github.com/users/amingilani/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-06-22T19:15:04Z","updated_at":"2017-12-28T05:26:53Z","closed_at":"2017-06-22T20:00:44Z","author_association":"NONE","body":"I get this error in production, while the app works perfectly in development.\r\n\r\nFrom my [Stack Overflow question](https://stackoverflow.com/questions/44690763/actionviewtemplateerror-cant-find-sales-js-in-app-public-packs-manifest-j):\r\n\r\n> ```\r\n> 2017-06-22T05:15:05.148829+00:00 app[web.1]: F, [2017-06-22T05:15:05.148717 #4] FATAL -- : [ef509b29-8637-41b3-8224-4423dbf2b2ed]\r\n> 2017-06-22T05:15:05.148948+00:00 app[web.1]: F, [2017-06-22T05:15:05.148883 #4] FATAL -- : [ef509b29-8637-41b3-8224-4423dbf2b2ed] ActionView::Template::Error (Can't find sales.js in /app/public/packs/manifest.json. Is webpack still compiling?):\r\n> 2017-06-22T05:15:05.149203+00:00 app[web.1]: F, [2017-06-22T05:15:05.149103 #4] FATAL -- : [ef509b29-8637-41b3-8224-4423dbf2b2ed]     1: %div#sale\r\n> 2017-06-22T05:15:05.149206+00:00 app[web.1]: [ef509b29-8637-41b3-8224-4423dbf2b2ed]     2: = javascript_pack_tag 'sales'\r\n> 2017-06-22T05:15:05.149297+00:00 app[web.1]: F, [2017-06-22T05:15:05.149231 #4] FATAL -- : [ef509b29-8637-41b3-8224-4423dbf2b2ed]\r\n> 2017-06-22T05:15:05.149398+00:00 app[web.1]: F, [2017-06-22T05:15:05.149328 #4] FATAL -- : [ef509b29-8637-41b3-8224-4423dbf2b2ed] app/views/sales/new.html.haml:2:in `_app_views_sales_new_html_haml___2340659139987297731_36903000'\r\n> 2017-06-22T05:15:07.004434+00:00 heroku[router]: at=info method=GET path=\"/favicon.ico\" host=planetlauncher.herokuapp.com request_id=8bca0b65-0d4a-494f-88c7-a4b31c2ff6dc fwd=\"202.163.79.6\" dyno=web.1 connect=1ms service=2ms status=200 bytes=143 protocol=https\r\n> ```\r\n> \r\n> There's only one route\r\n> \r\n> ```\r\n> Rails.application.routes.draw do\r\n>   root 'sales#new'\r\n>   resources :sales\r\n> end\r\n> ```\r\n> \r\n> My app has a single view:\r\n> \r\n> ```\r\n> # sales/new.html.haml\r\n> %div#sale\r\n> = javascript_pack_tag 'sales'\r\n> ```\r\n> \r\n> The view is replaced by a React component at `app/javascript/packs/sales.jsx` on load.\r\n> \r\n> The app works flawlessly in development, I ran rails `assets:precompile` before pushing, and deployed to Heroku.\r\n\r\nFull source for project is available at https://github.com/amingilani/planetlauncher"},"comment":{"url":"https://api.github.com/repos/rails/webpacker/issues/comments/354231184","html_url":"https://github.com/rails/webpacker/issues/532#issuecomment-354231184","issue_url":"https://api.github.com/repos/rails/webpacker/issues/532","id":354231184,"user":{"login":"earksiinni","id":5427394,"avatar_url":"https://avatars1.githubusercontent.com/u/5427394?v=4","gravatar_id":"","url":"https://api.github.com/users/earksiinni","html_url":"https://github.com/earksiinni","followers_url":"https://api.github.com/users/earksiinni/followers","following_url":"https://api.github.com/users/earksiinni/following{/other_user}","gists_url":"https://api.github.com/users/earksiinni/gists{/gist_id}","starred_url":"https://api.github.com/users/earksiinni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/earksiinni/subscriptions","organizations_url":"https://api.github.com/users/earksiinni/orgs","repos_url":"https://api.github.com/users/earksiinni/repos","events_url":"https://api.github.com/users/earksiinni/events{/privacy}","received_events_url":"https://api.github.com/users/earksiinni/received_events","type":"User","site_admin":false},"created_at":"2017-12-28T05:26:53Z","updated_at":"2017-12-28T05:26:53Z","author_association":"NONE","body":"Ah, I figured it out. I had created my Rails app with `--skip-sprockets` since I wanted everything to be managed by Webpack without getting Sprockets involved. Heroku's Ruby buildpack, however, merely runs `rake assets:precompile`, which in turn will run the `webpacker:compile` task, but if you don't have Sprockets, you won't have the `assets:precompile` task, and so the buildpack will never end up running `webpacker:compile`.\r\n\r\nI fixed this by going through the Rails source code and figuring out what needed to be added to my app to manually undo the `--skip-sprockets` option."}}
{"actor":{"display_login":"earksiinni"}}