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 3.5.3 版本微信小程序转 taro 报 compiler is not defined 错误 #12309

Closed
gzwgq222 opened this issue Aug 16, 2022 · 3 comments · Fixed by #12515
Closed

taro 3.5.3 版本微信小程序转 taro 报 compiler is not defined 错误 #12309

gzwgq222 opened this issue Aug 16, 2022 · 3 comments · Fixed by #12515
Labels
F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x
Milestone

Comments

@gzwgq222
Copy link

gzwgq222 commented Aug 16, 2022

相关平台

微信小程序

复现仓库

https://github.com/gzwgq222/weapp-convert-taro

小程序基础库: 3.25.2
使用框架: React

复现步骤

进入微信小程序项目根目录执行 taro convert

期望结果

正常 convert

实际结果

报 compiler is not defined 错误
企业微信截图_16606414368466

taro/cli

企业微信截图_16606414313885

@taro-bot2 taro-bot2 bot added F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x labels Aug 16, 2022
@gzwgq222
Copy link
Author

@Chen-jj

@gzwgq222
Copy link
Author

gzwgq222 commented Aug 16, 2022

降低到 3.4.7 版本是好的

企业微信截图_1660652271222

@wjljack
Copy link
Contributor

wjljack commented Sep 19, 2022

修改全局node_modules下面的@tarojs/cli/dist/convertor/index.js

        creator.template(templateName, 'package.json.tmpl', pkgPath, {
            description,
            projectName,
            compiler: 'webpack5',  // 增加
            version,
            css: 'sass',
            typescript: false,
            template: templateName,
            framework: this.framework
        });
        creator.template(templateName, path.join('config', 'index.js'), path.join(configDir, 'index.js'), {
            date,
            compiler: 'webpack5', // 增加
            projectName,
            framework: this.framework
        });

...

        creator.template(templateName, path.join('src', 'index.html'), path.join(this.convertDir, 'index.html'), {
            projectName  // 增加
        });

@Chen-jj Chen-jj added this to the 3.5.6 milestone Sep 20, 2022
@Chen-jj Chen-jj linked a pull request Sep 20, 2022 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants