【问题标题】:error TS2305: Module '"readline"' has no exported member 'Interface'. - Firebase Functions错误 TS2305:模块“readline”没有导出的成员“接口”。 - Firebase 功能
【发布时间】:2021-04-09 15:31:36
【问题描述】:

我正在部署 Firebase 功能,但在部署时出现此错误

../../../../node_modules/@types/inquirer/lib/utils/screen-manager.d.ts:1:10 - error TS2305: Module '"readline"' has no exported member 'Interface'.

1 import { Interface as ReadLineInterface } from "readline";
           ~~~~~~~~~


Found 15 errors.

npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! functions@ build: `tsc`
npm ERR! Exit status 2

我的 ts 配置,

{
  "compilerOptions": {
    "module": "commonjs",
    "noImplicitReturns": true,
    "noImplicitAny": false,
    "noUnusedLocals": true,
    "outDir": "lib",
    "sourceMap": true,
    "strict": true,
    "target": "es2017"
  },
  "compileOnSave": true,
  "include": [
    "src"
  ]
}

这个错误是突然发生的,我的项目曾经正确部署。我不知道为什么现在发生这种情况?请指导我这个错误的根本原因是什么

【问题讨论】:

    标签: node.js firebase


    【解决方案1】:

    我解决了使用 skipLibCheck 选项更新 ts 配置的问题:

        "skipLibCheck": true
    

    我希望它对你有用。

    【讨论】:

      猜你喜欢
      • 2017-03-29
      • 2021-12-20
      • 2022-01-16
      • 2021-03-25
      • 2020-11-13
      • 2022-01-18
      • 2018-09-04
      • 2017-06-13
      • 2019-11-28
      相关资源
      最近更新 更多