wechat-miniprogram / miniprogram-demo

微信小程序组件 / API / 云开发示例
https://developers.weixin.qq.com/miniprogram/dev/index.html
MIT License
6.54k stars 2.11k forks source link

如果Demo运行不起来?【2024-04-09】 #137

Open mozartee opened 2 months ago

mozartee commented 2 months ago

我是新手,按照官方推荐压根不能运行代码。 搜索issue,找到关键解决方案: https://github.com/wechat-miniprogram/miniprogram-demo/issues/125#issue-1957859089

另外,如果是 download zip 方式,在进行到 npm run init --legacy-peer-deps 时,会报错:

...
fatal: not a git repository (or any of the parent directories): .git

继续:git init, 然后在继续执行 npm run init --legacy-peer-deps,成功!

此时,项目会报错: image

找到对应目录,删除该项即可。

接下来愉快地运行吧!!!

BTW,吐槽一下,这么大官方Demo这么多问题也是头一次见!希望大佬长点心吧,😄

xieerduos commented 1 month ago

找到对应目录,删除该项即可。 miniprogram/app.json: 未找到 ["subpackages"][5]["pages"][0] 对应的 packageSkylineExamples/examples/address-book/pages/index/index.wxml 文件

可以按照以下图的方式删除,可以修复 miniprogram/app.json: 未找到 ["subpackages"][5]["pages"][0] 对应的 packageSkylineExamples/examples/address-book/pages/index/index.wxml 文件 ,感谢楼上的老铁提供的方案。

image