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

Taro v1.2.0-beta.12 编译h5报错,小程序正常 #1461

Closed
zzlit opened this issue Dec 11, 2018 · 6 comments
Closed

Taro v1.2.0-beta.12 编译h5报错,小程序正常 #1461

zzlit opened this issue Dec 11, 2018 · 6 comments

Comments

@zzlit
Copy link

zzlit commented Dec 11, 2018

问题描述
编译h5报错,小程序正常

复现步骤
npm run dev:h5

版本信息
image

_babylon@6.18.0@babylon/lib/index.js 报错处

var pp$5 = Parser.prototype;

// This function is used to raise exceptions on parse errors. It
// takes an offset integer (into the current `input`) to indicate
// the location of the error, attaches the position to the end
// of the error message, and then raises a `SyntaxError` with that
// message.

pp$5.raise = function (pos, message) {
  var loc = getLineInfo(this.input, pos);
  message += " (" + loc.line + ":" + loc.column + ")";
  var err = new SyntaxError(message);
  err.pos = pos;
  err.loc = loc;
  throw err;
};

期望行为

报错信息

image

系统信息

  • 操作系统: [e.g. Windows 10]
  • Taro 版本 [e.g. v1.2.0-beta.12]
  • Node.js 版本 [e.g. v8.11.3]
  • 报错平台 [h5]

补充信息

@taro-bot
Copy link

taro-bot bot commented Dec 11, 2018

欢迎提交 Issue~

如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏

如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。

Good luck and happy coding~

@luckyadam
Copy link
Member

报错信息贴完整点,相关代码贴一下看下

@zzlit
Copy link
Author

zzlit commented Dec 11, 2018

@luckyadam 报错信息就是那一段,前后都是正常的,我没找到报错的代码段在哪,小程序正常编译。

@luckyadam
Copy link
Member

image
应该就是这个文件

@zzlit
Copy link
Author

zzlit commented Dec 11, 2018

@luckyadam 已解决,就是这个文件出错了,感谢!

@taro-bot
Copy link

taro-bot bot commented Dec 11, 2018

Hello~

您的问题楼上已经提供了解决方案,如果没有更多的问题这个 issue 将在 15 天后被自动关闭。

如果您在这 15 天中更新更多信息自动关闭的流程会自动取消,如有其他问题也可以发起新的 Issue。

Good luck and happy coding~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants