Introduced vue to rails6 and added vuetify. → Copy and paste the vuetify parts as a trial. → Rails s → An error occurred when compiling to check if it works well in the browser.
ActionView::Template::Error (Webpacker can't find hello_vue in /usr/src/myapp/public/packs/manifest.json. Possible causes:
1. You want to set webpacker.yml value of compile to true for your environment
unless you are using the `webpack -w` or the webpack-dev-server.
2. webpack has not yet re-run to reflect updates.
3. You have misconfigured Webpacker's config/webpacker.yml file.
4. Your webpack configuration is not creating a manifest.
Your manifest contains:
{
"application.js": "/packs/js/application-9afcbb5693aa87623e69.js",
"application.js.map": "/packs/js/application-9afcbb5693aa87623e69.js.map",
"components/user.js": "/packs/js/components/user-156f569cb5c8b04ee2e1.js",
"components/user.js.map": "/packs/js/components/user-156f569cb5c8b04ee2e1.js.map",
"entrypoints": {
"application": {
"js": [
"/packs/js/application-9afcbb5693aa87623e69.js"
],
"js.map": [
"/packs/js/application-9afcbb5693aa87623e69.js.map"
]
},
"components/user": {
"js": [
"/packs/js/components/user-156f569cb5c8b04ee2e1.js"
],
"js.map": [
"/packs/js/components/user-156f569cb5c8b04ee2e1.js.map"
]
},
"main": {
"js": [
"/packs/js/main-f6918c73db91592ebf7f.js"
],
"js.map": [
"/packs/js/main-f6918c73db91592ebf7f.js.map"
]
}
},
"main.js": "/packs/js/main-f6918c73db91592ebf7f.js",
"main.js.map": "/packs/js/main-f6918c73db91592ebf7f.js.map"
}
):
11:
12: <body>
13: <%= yield %>
14: <%= javascript_pack_tag 'hello_vue' %>
15: </body>
16: </html>
app/views/layouts/application.html.erb:14
^C- Gracefully stopping, waiting for requests to finish
=== puma shutdown: 2020-11-12 02:56:13 +0000 ===
- Goodbye!
As it is written here, → https://github.com/rails/webpacker#vue When I ran the command below from the top, the error was resolved.
./bin/rails webpacker:install
./bin/rails webpacker:install:vue
bin/webpack
Recommended Posts