wechat-miniprogram / wechat-miniprogram/miniprogram-demo
示例跑不起来的几个问题,搞了几个小时,终于成功启动
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 7.2k
- Forks
- 2.2k
- Avg merge
- 10h 34m
- Merged PRs (30d)
- 2
Description
个人遇到的问题及解决过程,(2023年10月24日):
1、本地必须安装:git,npm
2、git clone到本地或download zip后解压,默认根目录为:miniprogram-demo,后续操作全部在根目录执行,miniprogram那个子目录看起来很诱惑,但不需要在这个或其他任何子目录做任何操作或执行命令;
3、微信开发者工具 小程序->导入,导入目录为根目录 ,appID使用测试号,导入后不出意外必定报错,先不管
4、【重要】 打开根目录下的package.json,将"@tencent/eslint-config-wxapp": "^0.5.2" 改为 "eslint-config-wxapp": "^1.0.0"
5、【重要】 打开根目录下的.gitmodules,将[submodule "miniprogram/packageSkylineExamples"]项的 url=xxx 那行改为 url = https://github.com/wechat-miniprogram/awesome-skyline.git
6、【重要】 根目录下执行命令 npm run init --legacy-peer-deps,不要按官方的npm run init,不出意外也是一堆错
7、切回微信开发者工具 工具->构建npm,等一会应该就出现界面了
8、我出现界面后曾出现白屏,只有tabbar,页面无内容,做了两个尝试,右上角详情-本地设置-调试基础库切换到高版本(3.1.3),console里有提示“Skyline 渲染模式在 2.29.2 及以上基础库支持 balabala..”下面有个点此切换模式,目前正常运行
0、还曾遇到过git断开问题,设置了git config --global https.proxy 127.0.0.1:xxx,梯子问题就不细说了,自行搜索
跑个示例这费事,简直天坑
感谢issue中的大佬们的解决方法,虽然都比较细碎,我翻了很多个参考综合解决,特此将完整流程记录
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the setup sequence in this issue, including package.json, .gitmodules, npm run init --legacy-peer-deps, and the WeChat Developer Tools steps. First reproduce the reported initialization and blank-page problems from the repository root. Done means the required setup and troubleshooting guidance is captured clearly enough for a fresh checkout to start the demo.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, javascript
- Domain
- developer-experience, documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100