首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >当在本地宿主AdminBro包函数采取路径时,但是当部署到Vercel产品时出现错误,为什么呢?

当在本地宿主AdminBro包函数采取路径时,但是当部署到Vercel产品时出现错误,为什么呢?
EN

Stack Overflow用户
提问于 2021-08-26 18:30:56
回答 1查看 212关注 0票数 0

在本地服务器上,它正在正常工作。只有当部署到Vercel时才会出现此错误。这是下面的代码-(错误发生在AdminBro.bundle中,因为它没有接受参数。)

代码语言:javascript
复制
imagePath: {
            isVisible: { list: false, filter: false, show: true, edit: true },
            components: {
              show: AdminBro.bundle(
                "components/admin-imgPath-component.jsx"
              ),
            },
          },

我正在得到的错误。

代码语言:javascript
复制
2021-08-26T18:14:08.075Z    undefined   ERROR   ConfigurationError: 
    Given file "components/admin-imgPath-component.jsx", doesn't exist.
    More information can be found at: https://softwarebrothers.github.io/admin-bro-dev/AdminBro.html
    at Function.bundle (/var/task/node_modules/admin-bro/lib/admin-bro.js:375:13)
    at Object.<anonymous> (/var/task/routes/admin.js:47:30)
    at Module._compile (internal/modules/cjs/loader.js:1072:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
    at Module.load (internal/modules/cjs/loader.js:937:32)
    at Function.Module._load (internal/modules/cjs/loader.js:778:12)
    at Module.require (internal/modules/cjs/loader.js:961:19)
    at require (internal/modules/cjs/helpers.js:92:18)
    at Object.<anonymous> (/var/task/app.js:25:21)
    at Module._compile (internal/modules/cjs/loader.js:1072:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
    at Module.load (internal/modules/cjs/loader.js:937:32)
    at Function.Module._load (internal/modules/cjs/loader.js:778:12)
    at ModuleWrap.<anonymous> (internal/modules/esm/translators.js:199:29)
    at ModuleJob.run (internal/modules/esm/module_job.js:170:25)
    at async Loader.import (internal/modules/esm/loader.js:178:24)
RequestId: ce1bf09a-857f-4c40-8a3b-e8a1762590bb Error: Runtime exited with error: exit status 1
Runtime.ExitError
EN

回答 1

Stack Overflow用户

发布于 2022-04-05 08:06:10

你得打电话

代码语言:javascript
复制
show: AdminBro.bundle(
            "components/admin-imgPath-component"
          ),

没有延伸到最后。确保adminjs自动生成带有文件.adminjs/.entry.js的文件夹,其中组件被链接到AdminJS实例。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/68943728

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档