使用 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
关于javascript - rails 6.1 : Webpacker can't find application. js,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69904386/