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

convert原生小程序到taro,component部分会报“没有JS文件!”。 #2919

Closed
ThomasLiuSeu opened this issue Apr 29, 2019 · 2 comments
Assignees
Labels
A-taroize Area - Taro convert 相关

Comments

@ThomasLiuSeu
Copy link

问题描述
convert原生小程序到taro,component部分会报“没有JS文件!”。

复现步骤
[复现问题的步骤]

运行 taro convert

[或者可以直接贴源代码,能贴文字就不要截图]





期望行为
正确转换

报错信息

错误 组件转换 /Users/components/returnHome/returnHome.js
Error: 组件 /Users/components/returnHome/returnHome 没有 JS 文件!
at components.forEach.componentObj (/usr/local/lib/node_modules/@tarojs/cli/src/convertor.js:567:17)
at Set.forEach ()
at Convertor.traverseComponents (/usr/local/lib/node_modules/@tarojs/cli/src/convertor.js:552:16)
at pages.forEach.page (/usr/local/lib/node_modules/@tarojs/cli/src/convertor.js:540:14)
at Set.forEach ()
at Convertor.traversePages (/usr/local/lib/node_modules/@tarojs/cli/src/convertor.js:476:16)
at Convertor.run (/usr/local/lib/node_modules/@tarojs/cli/src/convertor.js:715:10)
at Object. (/usr/local/lib/node_modules/@tarojs/cli/bin/taro-convert:12:11)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)

系统信息

Taro v1.2 及以上版本已添加 taro info 命令,方便大家查看系统及依赖信息,运行该命令后将结果贴下面即可。

Taro CLI 1.2.26 environment info:
System:
OS: macOS 10.14.4
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.15.2 - /usr/local/bin/node
npm: 6.9.0 - /usr/local/bin/npm
npmPackages:
@tarojs/components: 1.2.26 => 1.2.26
@tarojs/plugin-babel: 1.2.26 => 1.2.26
@tarojs/plugin-csso: 1.2.26 => 1.2.26
@tarojs/plugin-sass: 1.2.26 => 1.2.26
@tarojs/plugin-uglifyjs: 1.2.26 => 1.2.26
@tarojs/router: 1.2.26 => 1.2.26
@tarojs/taro: 1.2.26 => 1.2.26
@tarojs/taro-alipay: 1.2.26 => 1.2.26
@tarojs/taro-h5: 1.2.26 => 1.2.26
@tarojs/taro-swan: 1.2.26 => 1.2.26
@tarojs/taro-tt: 1.2.26 => 1.2.26
@tarojs/taro-weapp: 1.2.26 => 1.2.26
@tarojs/webpack-runner: 1.2.26 => 1.2.26
eslint-config-taro: 1.2.26 => 1.2.26
eslint-plugin-taro: 1.2.26 => 1.2.26
nervjs: ^1.3.9 => 1.3.13

补充信息
我的components文件夹是和pages文件夹平级的,不知道是不是taro默认只编译pages文件夹下面的文件

@taro-bot
Copy link

taro-bot bot commented Apr 29, 2019

欢迎提交 Issue~

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

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

Good luck and happy coding~

@yuche yuche added CLI labels Apr 29, 2019
@taro-bot
Copy link

taro-bot bot commented Apr 29, 2019

CC @luckyadam

@taro-bot taro-bot bot assigned luckyadam and unassigned luckyadam Apr 29, 2019
@Chen-jj Chen-jj added A-taroize Area - Taro convert 相关 and removed CLI labels Jul 6, 2020
@Chen-jj Chen-jj closed this as completed Nov 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-taroize Area - Taro convert 相关
Projects
None yet
Development

No branches or pull requests

5 participants