gpt4 book ai didi

ruby-on-rails - Rails:Webpacker::Manifest::MissingEntryError in Home#index

转载 作者:行者123 更新时间:2023-12-04 05:52:54 25 4
gpt4 key购买 nike

Webpacker::Manifest::MissingEntryError in Home#index
显示/Users/khalidhosein/Desktop/myEPKmedia/builder/khalid101/app/views/layouts/embedded_app.html.erb 其中第 7 行提出:

Webpacker can't find hello_react.js in /Users/khalidhosein/Desktop/myEPKmedia/builder/khalid101/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/application-68dcba18197451fbb79e.js",
"application.js.map": "/packs/application-68dcba18197451fbb79e.js.map"
}
Extracted source (around line #7):
5
6
7
8
9
10

<% application_name = ShopifyApp.configuration.application_name %>
<title><%= application_name %></title>
<%= javascript_pack_tag 'hello_react' %>
<%= stylesheet_link_tag 'application' %>
<%= javascript_include_tag 'application', "data-turbolinks-track" => true %>
<%= csrf_meta_tags %>

Rails.root: /Users/khalidhosein/Desktop/myEPKmedia/builder/khalid101

Application Trace | Framework Trace | Full Trace
app/views/layouts/embedded_app.html.erb:7:in `_app_views_layouts_embedded_app_html_erb___4509380428416253144_70127991029820'
Request
Parameters:

None

尝试将我的 Rails 应用程序与 React 前端连接时出现此错误。我已经尝试从所有来源研究和重新配置文件。我还重新创建了 manifyingt.json 文件和包库。我正在关注本教程:
https://github.com/natemacinnes/natemacinnes.github.io/blob/master/rails-5-shopify-app-setup.md

如果有人有任何想法,我们将不胜感激,因为没有太多的文档或教程来讨论如何将 Rails Shopify API 与 React 连接起来。

我的代码----> https://github.com/KhalidH82/ShopifyApp-React-Rails

最佳答案

虽然我没有使用 react,但在新创建的 Rails 6 应用程序上遇到了同样的错误。重新安装 webpacker 为我修复了它:
bundle exec rake webpacker:install
我想这可能是缺少依赖项,或者旧版本中的错误(我注意到 webpack-dev-server 版本已升级为 3.8.1 )。

关于ruby-on-rails - Rails:Webpacker::Manifest::MissingEntryError in Home#index,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54113179/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com