简体   繁体   中英

error TS2305: Module '“readline”' has no exported member 'Interface'. - Firebase Functions

I'm tying to deploy firebase functions, while deploying I'm getting this error

../../../../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

My ts config,

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

This error is happening suddenly, my project used to deploy properly. I dono why this happening now? please guide me what is the root cause for this error

I solved updating the ts config with skipLibCheck option:

    "skipLibCheck": true

I hope it works for you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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