compiler-errors - 回送4.x- “Error: The connector has not been initialized.”

标签 compiler-errors loopbackjs

我目前正在采用一个基于Loopback的项目。我正在尝试切换到开发人员数据库,并且主要通过查找和替换策略来解决此问题。

在将对生产数据库的所有引用更改为指向开发数据库后,我得到了错误:

Cannot start the application. Error: The connector has not been initialized.
    at PostgresDataSource.freeze (project/api/node_modules/loopback-datasource-juggler/lib/datasource.js:1982:11)
    at PostgresDataSource.DataSource.autoupdate (project/api/node_modules/loopback-datasource-juggler/lib/datasource.js:1068:8)
    at InstrideIdentityApiApplication.migrateSchema (project/api/node_modules/@loopback/repository/dist/mixins/repository.mixin.js:186:40)
    at <anonymous>

我不知道这是什么意思。我尝试在git中搜索对find the error code的回送,但是没有结果。我已经研究了docs on connectors,但是它没有阐明连接器被“初始化”到什么阶段。

我的问题是:
  • 这个错误到底想告诉我什么?
  • 通常可以做什么来解决它?
  • 最佳答案

    What exactly is this error trying to tell me?



    错误告诉您数据源未配置任何连接器。如果查看堆栈跟踪,将在调用migrateSchema时触发错误。没有连接器,数据源将不知道如何连接到数据库,因此无法执行架构迁移。

    What does one typically do to fix it?



    确保您的数据源配置包含connector属性。

    关于compiler-errors - 回送4.x- “Error: The connector has not been initialized.”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55250918/

    相关文章:

    visual-c++ - VC++ 又出现了那个该死的 C2679 错误

    r - 错误 : package or namespace load failed for ‘tidyverse’ in loadNamespace

    node.js - 如何通过数组属性查询模型

    javascript - 生成模型图环回

    javascript - Strongloop 唯一 ID 生成

    java - 当我尝试在 NetBeans 上运行简单程序时出现错误 "No main class found"。

    python - 为什么我得到一个错误,该错误是指我的类(class)圈子中不存在的对象?

    c++ - 编译器错误 MB_LEN_MAX 的假定值错误

    node.js - 将几何图形(JSON)插入loopbackjs模型中

    javascript - Strongloop EmbedsMany helper 方法未找到