-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
taro covert 页面转换 报错 #2191
Comments
欢迎提交 Issue~ 如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏 如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。 Good luck and happy coding~ |
这种方式做不到,其实你这个写法这样还是复杂了,还可以: const test = require('..')
Page({
...test, {
...
}
}) 但是这样也不行,因为 taro convert 是基于语法转换的,所以你必须显示地把所有内容都写出来。 |
Hello~ 您的问题楼上已经提供了解决方案,如果没有更多的问题这个 issue 将在 15 天后被自动关闭。 如果您在这 15 天中更新更多信息自动关闭的流程会自动取消,如有其他问题也可以发起新的 Issue。 Good luck and happy coding~ |
Thanks a lot !
Yu Che <[email protected]> 于2019年2月18日周一 上午9:48写道:
… 这种方式做不到,其实你这个写法这样还是复杂了,还可以:
const test = require('..')
Page({
...test, {
...
}
})
但是这样也不行,因为 taro convert 是基于语法转换的,所以你必须显示地把所有内容都写出来。
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2191 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AM-wdQ3awwCfm0Vj0FVIxryTDywChv6-ks5vOgaLgaJpZM4a_lcz>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
执行 taro covert 部分页面转换 错误
[问题描述:转换错误的这些页面都采用相同的语法形式,相同的代码共用形式]
复现步骤
期望行为
期望包容这种形式的可以正常运行的微信小程序的原生代码,支持其可以成功转换成 "taro"
报错信息
...
错误 页面转换 pages/home/home.js
TypeError: Property body of ClassMethod expected node to be of a type ["BlockStatement"] but instead got null
at Object.validate (C:\Users\xiaoh\AppData\Roaming\nvm\v11.2.0\node_modules@tarojs\cli\node_modules_babel-types@6.26.0@babel-types\lib\definitions\index.js:109:13)
at validate (C:\Users\xiaoh\AppData\Roaming\nvm\v11.2.0\node_modules@tarojs\cli\node_modules_babel-types@6.26.0@babel-types\lib\index.js:505:9)
at Object.builder (C:\Users\xiaoh\AppData\Roaming\nvm\v11.2.0\node_modules@tarojs\cli\node_modules_babel-types@6.26.0@babel-types\lib\index.js:466:7)
at properties.map.prop (C:\Users\xiaoh\AppData\Roaming\nvm\v11.2.0\node_modules@tarojs\cli\node_modules_@[email protected]@@tarojs\taroize\lib\src\script.js:224:30)
at Array.map ()
at parsePage (C:\Users\xiaoh\AppData\Roaming\nvm\v11.2.0\node_modules@tarojs\cli\node_modules_@[email protected]@@tarojs\taroize\lib\src\script.js:121:32)
at CallExpression (C:\Users\xiaoh\AppData\Roaming\nvm\v11.2.0\node_modules@tarojs\cli\node_modules_@[email protected]@@tarojs\taroize\lib\src\script.js:43:29)
at NodePath._call (C:\Users\xiaoh\AppData\Roaming\nvm\v11.2.0\node_modules@tarojs\cli\node_modules_babel-traverse@6.26.0@babel-traverse\lib\path\context.js:76:18)
at NodePath.call (C:\Users\xiaoh\AppData\Roaming\nvm\v11.2.0\node_modules@tarojs\cli\node_modules_babel-traverse@6.26.0@babel-traverse\lib\path\context.js:48:17)
at NodePath.visit (C:\Users\xiaoh\AppData\Roaming\nvm\v11.2.0\node_modules@tarojs\cli\node_modules_babel-traverse@6.26.0@babel-traverse\lib\path\context.js:105:12)
...
系统信息
👽 Taro v1.2.13
Taro CLI 1.2.13 environment info:
System:
OS: Windows 10
Binaries:
Node: 11.2.0
npm: 6.4.1
The text was updated successfully, but these errors were encountered: