lblblong / tarojs-router-next

Taro 小程序路由库/自动生成带参数类型提示的路由方法/允许传递任意类型、任意大小的参数数据/同步的路由方法调用/koa体验一致的路由中间件
https://lblblong.github.io/tarojs-router-next/
MIT License
248 stars 23 forks source link

taro升级3.4.5时报错 #46

Closed jianhao2010303 closed 2 years ago

jianhao2010303 commented 2 years ago

\tarojs-router-next-plugin\dist\router-code-generator\index.js:113 this.ctx.onBuildStart(function () { ^

TypeError: this.ctx.onBuildStart is not a function at RouterCodeGenerator.listenBuildStart (E:\workspace_xuct\calendar\xuct-calendar-weapp\node_modules\tarojs-router-next-plugin\src\router-code-generator\index.ts:84:14) at E:\workspace_xuct\calendar\xuct-calendar-weapp\node_modules\tarojs-router-next-plugin\src\index.ts:5:40 at Kernel.initPlugin (D:\Node\node_global\node_modules\@tarojs\cli\node_modules\@tarojs\service\dist\Kernel.js:111:16) at Kernel.resolvePlugins (D:\Node\node_global\node_modules\@tarojs\cli\node_modules\@tarojs\service\dist\Kernel.js:86:18) at Kernel.initPresetsAndPlugins (D:\Node\node_global\node_modules\@tarojs\cli\node_modules\@tarojs\service\dist\Kernel.js:74:14) at Kernel. (D:\Node\node_global\node_modules\@tarojs\cli\node_modules\@tarojs\service\dist\Kernel.js:261:18) at Generator.next () at D:\Node\node_global\node_modules\@tarojs\cli\node_modules\@tarojs\service\dist\Kernel.js:8:71 at new Promise () at __awaiter (D:\Node\node_global\node_modules\@tarojs\cli\node_modules\@tarojs\service\dist\Kernel.js:4:12)

lblblong commented 2 years ago

之前 taro 是什么版本,还有 tarojs-router-next-plugin 是什么版本

jianhao2010303 commented 2 years ago

更升级了tarojs-router-next 2.8.1 , 刚更新taro 到3.4.5.

之前 tarojs-router-next 2.7, taro 3.4.4.

taro的cli是不是调整了?

lblblong commented 2 years ago

嗯,我刚刚看了下 taro-cli 的代码,是有些变动,你是运行哪个命令报的这个错误?

jianhao2010303 commented 2 years ago

taro update project 直接报错了。

jianhao2010303 commented 2 years ago

升级了3.4.6,还是报错。。麻烦大佬看看

lblblong commented 2 years ago

是 taro 的问题,我这边做些兼容也可以解决,先看看官方怎么处理,建议你还是先用着旧版本

jianhao2010303 commented 2 years ago

那麻烦给taro提个BUG?

lblblong commented 2 years ago

嗯,已经提了

jianhao2010303 commented 2 years ago

赞!

jianhao2010303 commented 2 years ago

已修复