繁体   English   中英

Rails 6.1:Webpacker 找不到 application.js

[英]Rails 6.1: Webpacker can't find application.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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM