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

新版微信开发者工具编译报错 #505

Open
wanzijinx opened this issue Dec 2, 2020 · 2 comments
Open

新版微信开发者工具编译报错 #505

wanzijinx opened this issue Dec 2, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@wanzijinx
Copy link

wanzijinx commented Dec 2, 2020

bug描述
用官方发布的新版微信开发者工具:稳定版1.03.2011120,官方组件全局注册,编译时会报错[ app.json 文件内容错误] app.json: ["usingComponents"]["c-actionsheet"]: "./../npm/cml-ui/components/c-actionsheet/c-actionsheet" 未找到,历史项目已经有很多代码了,重新局部注册组件改动成本很大。旧版本的微信开发者工具只要在本地设置把启用新的编译模块这个选项取消勾选就可以,新的工具没有这个选项了

复现bug的步骤

  1. 正常cml dev构建项目
  2. 打开微信开发者工具,
  3. 报错,项目无法打开,把app.json的usingComponents路径修改为正确的才可以编译

问题截图
image

编译环境信息

  • chameleon-tool 版本:1.0.6
  • nodejs版本、npm版本:[node v12.10.0、npm 6.10.3]
  • 电脑操作系统: [Windows 10]

运行环境信息

  • 端版本: [微信小程序]
  • 手机机型: [e.g. iPhone6 12.0]
@wanzijinx wanzijinx added the bug Something isn't working label Dec 2, 2020
@jimwmg
Copy link
Collaborator

jimwmg commented Dec 15, 2020

是直接cml init project 就直接不能运行吗?确定了就是微信开发者工具升级的问题?

能否提供下demo吧 我们看下

@wanzijinx
Copy link
Author

是直接cml init project 就直接不能运行吗?确定了就是微信开发者工具升级的问题?

能否提供下demo吧 我们看下

是的,就直接cml init project,配置加上cmlComponents: ['cml-ui']就有这个报错,大概率就是开发者工具升级导致的,从六月到现在没升级的同事一直没问题,是我最近升级出现的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants