Rails 6.1:Webpacker 找不到应用程序.js



使用rails 6.1.4安装新应用程序。运行应用程序时,我得到以下信息。。。。

来自浏览器:

Showing /home/james/ReachTech/app/views/layouts/application.html.erb where line #10 raised:
Webpacker can't find application.js in /home/james/ReachTech/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:
{
}
Extracted source (around line #10):
8
9
10
11
12
13

<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>
</head>
<body>

我想使用javascript。我已多次重新启动该应用程序。有什么建议吗?

请运行此命令

yarn install

相关内容

最新更新