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

require本地代码和包代码表现不一致 #2084

Closed
monyee opened this issue Jan 30, 2019 · 5 comments
Closed

require本地代码和包代码表现不一致 #2084

monyee opened this issue Jan 30, 2019 · 5 comments

Comments

@monyee
Copy link

monyee commented Jan 30, 2019

问题描述
页面引用了本地的lib目录下的passport.js(里面有await promise相关的应用)
后来我把passport单独发布了npm(经过了babel转es5)两份代码一致

image

通过npm引入的promise方法一直不返回,本地lib/passport可以
就算把dist下lib/passport 直接复制到npm/xx/passport里也不行

期望行为
本地代码和通过npm包引入的行为一致

系统信息

Taro v1.2 8

  • 操作系统: [e.g. Windows 7]
  • Taro 版本 [e.g. v1.2 8]
  • Node.js 版本 [e.g. v10.15.0]
  • 报错平台 [ weapp]
@taro-bot
Copy link

taro-bot bot commented Jan 30, 2019

欢迎提交 Issue~

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

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

Good luck and happy coding~

@luckyadam
Copy link
Member

有什么报错

@monyee
Copy link
Author

monyee commented Jan 30, 2019

没有报错 只是await的方法不返回了 卡住

@luckyadam
Copy link
Member

能否给一个可以复现的 demo,以排查问题

@monyee
Copy link
Author

monyee commented Jan 31, 2019

已发现是自己这边问题,感谢@luckyadam 请删了此issue

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

2 participants