atzcl / z

基于 MidwayJS(EggJS) + TypeScript 的多模块应用 [ NodeJS 版 ]
129 stars 20 forks source link

数据库迁移报错 #10

Closed holiyo closed 4 years ago

holiyo commented 4 years ago

image $ ts-node -r tsconfig-paths/register ./node_modules/typeorm/cli.js migration:run Error during migration run: src/app/foundations/ORM/Model/BuildsQueries.ts:43:30 - error TS7016: Could not find a declaration file for module 'sequelize/lib/transaction'. 'D:/midway/ts-midway/node_modules/sequelize/lib/transaction.js' implicitly has an 'any' type. Try npm install @types/sequelize if it exists or add a new declaration (.d.ts) file containing declare module 'sequelize/lib/transaction';

43 import Transaction = require("sequelize/lib/transaction")

atzcl commented 4 years ago

ts-node 升级后导致的问题,已 fix,感谢

holiyo commented 4 years ago

yarn run v1.21.1 $ ts-node -r tsconfig-paths/register ./node_modules/typeorm/cli.js migration:run Error during migration run: src/app/foundations/Decorators/Validate.ts:29:41 - error TS2339: Property 'all' does not exist on type 'Request'.

29 await ctx.validate(rules, request.all())

holiyo commented 4 years ago

image

atzcl commented 4 years ago

@holiyo 我本地跑了下,没问题嚄,可以尝试下升级依赖?