-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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的TS版本过低 #4631
Comments
欢迎提交 Issue~ 如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏 如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。 Good luck and happy coding~ |
typescript-estree 这个包不支持更高的 TypeScript 版本,它是 typescript-eslint 的依赖,不是 Taro 本身的原因。 之后会考虑升级 typescript-eslint。 |
@Garfield550 我可以自己升级是吗?现在 |
那现在卡住不应该吧?要不结束,要不继续执行 ➜ tarotest git:(master) ✗ taro doctor
👽 Taro v1.3.20
⠋ 正在诊断项目...=============
WARNING: You are currently running a version of TypeScript which is not officially supported by typescript-estree.
You may find that it works just fine, or you may not.
SUPPORTED TYPESCRIPT VERSIONS: >=3.2.1 <3.6.0
YOUR TYPESCRIPT VERSION: 3.6.4
Please only submit bug reports when using the officially supported version.
=============
⠴ 正在诊断项目...^C%
➜ tarotest git:(master) ✗ ./node_modules/.bin/tsc -v
Version 3.6.4
➜ tarotest git:(master) ✗ tsc -v
Version 3.3.3
➜ tarotest git:(master) ✗ 我发现我全局的版本3.3.3,本地的是3.6.4 typescript@^3.0.1:
version "3.6.4"
resolved "https://registry.npm.taobao.org/typescript/download/typescript-3.6.4.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftypescript%2Fdownload%2Ftypescript-3.6.4.tgz#b18752bb3792bc1a0281335f7f6ebf1bbfc5b91d"
integrity sha1-sYdSuzeSvBoCgTNff26/G7/FuR0= yarn add [email protected] 修复了这个问题了, ➜ tarotest git:(master) ✗ taro doctor
👽 Taro v1.3.20
⠴ 正在诊断项目... |
每个页面的config怎么取消检查 ➜ tarotest git:(master) ✗ taro update project
👽 Taro v1.3.20
更新项目 package.json 成功!
yarn install v1.19.1
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
Done in 38.36s.
➜ tarotest git:(master) ✗ taro doctor
👽 Taro v1.3.20
✔ 诊断完成
检查 Taro 配置 (/Users/chenyulun390/learn/tarotest/config/index.js)
[✓] 没有发现问题
检查依赖
[✓] 没有发现问题
检查推荐内容
[!] 没有检查到常见的测试依赖(jest/mocha/ava/tape/jesmine/karma), 配置测试可以帮助提升项目质量
可以参考 https://github.com/NervJS/taro-ui-sample 项目, 其中已经包含了完整的测试配置与范例
[!] 没有检查到 Readme (readme/readme.md/readme.markdown), 编写 Readme 可以方便其他人了解项目
检查 ESLint (以下为 ESLint 的输出)
/Users/chenyulun390/learn/tarotest/src/app.tsx
1:27 error 'Config' is defined but never used. Allowed unused vars must match /Taro/u no-unused-vars
21:3 warning config should be placed after componentDidMount react/sort-comp
/Users/chenyulun390/learn/tarotest/src/pages/index/index.tsx
1:27 error 'Config' is defined but never used. Allowed unused vars must match /Taro/u no-unused-vars
14:3 warning config should be placed after componentWillUnmount react/sort-comp
✖ 4 problems (2 errors, 2 warnings) |
添加 ESLint 排除规则。 |
我就奇怪为什么eslint会对Config未使用报错 |
问题描述
taro doctor命令以后提示了ts版本过高后一直卡住,新建的项目配置ts、默认模板
复现步骤
[复现问题的步骤]
期望行为
升级ts版本
报错信息
系统信息
补充信息
[可选]
[根据你的调查研究,出现这个问题的原因可能在哪里?]
The text was updated successfully, but these errors were encountered: