Introduction de vue sur rails6 et ajout de vuetify. → Copiez et collez les parties vuetify comme un essai. → rails s → Une erreur est survenue lors de la compilation pour vérifier avec le navigateur s'il fonctionne correctement.
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!
Tel qu'il est écrit ici, → https://github.com/rails/webpacker#vue L'exécution de la commande ci-dessous à partir du dessus a résolu l'erreur.
./bin/rails webpacker:install
./bin/rails webpacker:install:vue
bin/webpack
Recommended Posts