zhangdaren / miniprogram-to-uniapp

轻松将各种小程序转换为uni-app项目
Other
1.67k stars 277 forks source link

转换报错,只有css生成 #78

Closed chenzefeng09 closed 4 years ago

chenzefeng09 commented 4 years ago

问题描述?

转换我的项目时,报错如下

文件类型: Page 路径: ../miniapp-douniu/prepay/pages/apply_advance_pay/apply_advance_pay.js (node:17820) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'name' of undefined at dataArr.forEach.obj (/usr/local/lib/node_modules/miniprogram-to-uniapp/src/wx2uni/jsHandle.js:191:44) at Array.forEach (<anonymous>) at defineValueHandle (/usr/local/lib/node_modules/miniprogram-to-uniapp/src/wx2uni/jsHandle.js:190:13) at componentTemplateBuilder (/usr/local/lib/node_modules/miniprogram-to-uniapp/src/wx2uni/jsHandle.js:392:5) at jsHandle (/usr/local/lib/node_modules/miniprogram-to-uniapp/src/wx2uni/jsHandle.js:1102:35) at /usr/local/lib/node_modules/miniprogram-to-uniapp/src/index.js:658:54 at process.internalTickCallback (internal/process/next_tick.js:77:7) (node:17820) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2) (node:17820) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. 生成的项目里只有css文件生成了,wxml和js都没有 image

zhangdaren commented 4 years ago

wtu -V的版本是多少? 看起来是你/miniapp-douniu/prepay/pages/apply_advance_pay/apply_advance_pay.js这个页面,或者别的页面里面的data属性里面有非常规写法,可以贴一下嘛?

chenzefeng09 commented 4 years ago

image

chenzefeng09 commented 4 years ago

image

zhangdaren commented 4 years ago

image

似乎我已经定位到原因了,,麻烦,找到:/usr/local/lib/node_modules/miniprogram-to-uniapp/src/wx2uni/jsHandle.js 这个文件,将上面里line: 186~196行删除,然后再试试呢?

chenzefeng09 commented 4 years ago

会报这个找不到 image

chenzefeng09 commented 4 years ago

image 改成这样,可以转换出vue了

chenzefeng09 commented 4 years ago

79