thx / rap2-delos

阿里妈妈前端团队出品的开源接口管理工具RAP第二代
http://rap2.taobao.org
MIT License
7.65k stars 1.35k forks source link

npm run build 报错 #815

Closed Jerryye17 closed 3 years ago

Jerryye17 commented 3 years ago

npm run build 报错

[root@iZuf62dkdgvkdmr0i6sfkeZ rap2-delos]# npm run build

rap2-delos@2.9.0 build rimraf -rf dist/ && tsc

src/routes/repository.ts:618:9 - error TS2322: Type 'string' is not assignable to type 'number'.

618 const repositoryId: number = ctx.params.id


src/routes/repository.ts:625:9 - error TS2322: Type 'string' is not assignable to type 'number'.

625   const repositoryId: number = ctx.params.id

src/service/mail.ts:17:28 - error TS2339: Property 'response' does not exist on type 'SentMessageInfo'.

17 resolve(info.response)


src/service/mail.ts:44:28 - error TS2339: Property 'response' does not exist on type 'SentMessageInfo'.

44               resolve(info.response)

Found 4 errors.

[root@iZuf62dkdgvkdmr0i6sfkeZ rap2-delos]#

环境 CentOS 7.9 MySQL 5.7 Nnodejs-15.14.0 Redis 5.09 git clone https://github.com/thx/rap2-delos.git 方式安装

tangsiwen commented 3 years ago

我也出现这个问题

tangsiwen commented 3 years ago

大佬,能解答一下不

asawind commented 3 years ago

ts强类型报错 src/routes/repository.ts 618 625 改为const repositoryId: number = parseInt(ctx.params.id) src/service/mail.ts 17 44 我是将resolve(info.response)改为resolve(info)