reproduce bug
When I first ran the uniapp project on the Alipay developer tool, my login page was always under pages/index/login and ran normally on other developer tools, but it kept reporting errors on the Alipay developer tool.
Error screenshot
Directory Structure
Solution 1
Add *** "lazyCodeLoading" : "requiredComponents"*** in the manifest.json file, and you're done
"mp-alipay" : {
"usingComponents" : true,
"appid" : "你的支付宝小程序ID",
"lazyCodeLoading" : "requiredComponents",//这一句
"uniStatistics" : {
"enable" : true
}
},
Solution 2
If method 1 does not work, create a new directory and put the page that just reported the error into it.
A page needs to create a new directory