Skip to content
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

编译成web时,wxml内嵌的wxs脚本转换报错了 #9

Open
AbooJan opened this issue Nov 23, 2017 · 2 comments
Open

编译成web时,wxml内嵌的wxs脚本转换报错了 #9

AbooJan opened this issue Nov 23, 2017 · 2 comments

Comments

@AbooJan
Copy link

AbooJan commented Nov 23, 2017

错误信息

Error parsing statement => location.name(singler.location) <=  Unknown Type: CallExpression{ Error parsing statement => location.name(singler.location) <= : Unknown Type: CallExpression
    at walk (/usr/local/lib/node_modules/hera-cli/node_modules/wxml-transpiler/build.js:1:6095)
    at walk (/usr/local/lib/node_modules/hera-cli/node_modules/wxml-transpiler/build.js:1:4201)
    at walk (/usr/local/lib/node_modules/hera-cli/node_modules/wxml-transpiler/build.js:1:4141)
    at walk (/usr/local/lib/node_modules/hera-cli/node_modules/wxml-transpiler/build.js:1:4005)
    at walkExp (/usr/local/lib/node_modules/hera-cli/node_modules/wxml-transpiler/build.js:1:6204)
    at parseExp (/usr/local/lib/node_modules/hera-cli/node_modules/wxml-transpiler/build.js:1:6400)
    at parseText (/usr/local/lib/node_modules/hera-cli/node_modules/wxml-transpiler/build.js:1:3701)
    at Object.chars (/usr/local/lib/node_modules/hera-cli/node_modules/wxml-transpiler/build.js:1:18629)
    at parseHTML (/usr/local/lib/node_modules/hera-cli/node_modules/wxml-transpiler/build.js:1:16164)
    at parse$1 (/usr/local/lib/node_modules/hera-cli/node_modules/wxml-transpiler/build.js:1:16891)
  name: 'Error parsing statement => location.name(singler.location) <= ' }

When Parsing: ./pages/home/home.wxml
=====v=====
Error executing: node /usr/local/lib/node_modules/hera-cli/node_modules/weweb-cli/bin/weweb /Users/aboo/Downloads/HERA/src -b -d heraTmp/web
=====^=====
(node:7501) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: child process exited with code 1
(node:7501) [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.

这是wxml内嵌的wxs, location是字符串类型

<wxs module="location">
    var showName = function(location) {
        var places = location.split("/");
        var showName = places[0] + " " + places[1];
        return showName;
    }
    module.exports = {
        name: showName,
    }
</wxs>

不知道是不是不支持wxs的转换

@IOriens
Copy link
Contributor

IOriens commented Nov 23, 2017

抱歉,现在还不支持 wxs 的转换,我们会尽快加上

@IOriens IOriens closed this as completed Nov 23, 2017
@IOriens IOriens reopened this Nov 23, 2017
@IOriens IOriens added this to To Do in Schedule Dec 14, 2017
@anzhen9
Copy link

anzhen9 commented Nov 29, 2018

一年了。。。。这项目废了?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Schedule
  
Common-ToDo
Development

No branches or pull requests

3 participants