This article will introduce to you the steps to solve the error when using reLaunch jump in the development of WeChat applet. I hope it will be helpful to everyone!
Recently I was working on a WeChat applet project, and encountered an error message about the WeChat applet using reLaunch to jump. For those who are new to WeChat applet development It is also a relatively common error for readers, so this blog post will share the solution to this error for easy reference and use in the future.
By error reproduction, the specific error log prompt is as follows:
VM181:1 (in promise) MiniProgramError {"errMsg":"reLaunch:fail page \"pages/index/home/home\" is not found"} Object
By analyzing the above error information and searching for the error information and its location, it was confirmed that the error was reported when using reLaunch to jump. According to the above error log description and Troubleshoot the cause, and after checking, make an analysis and summary of the possible causes of the error.
Through the three methods of troubleshooting error reports derived from the above analysis, the error report problem can be solved by checking one by one. The specific operation steps are summarized as follows:
1. The written file name may be incorrect. Check whether there are any inconsistencies in the spelling of letters;
2. The file path input is incorrect. If it is a full path, please pay attention to the beginning of the path. Be sure to add the "/" symbol;
3. The file path is not defined in app.json. Let me share a convenient and quick way to add interface files: the pages array in the app.json file. Add a new path directly, and the relevant files will be generated directly after saving. There is no need to manually generate the page file, and finally register it; the specific operation is as shown in the figure below:
Through the above troubleshooting steps, the reLaunch jump error problem encountered is the third situation. The file path is not defined in app.json, resulting in an error message indicating that the file cannot be found.
Through the above solutions to errors reported when using reLaunch to jump during the development of WeChat mini programs, readers can learn about the corresponding troubleshooting methods. This is especially an important knowledge point for developers who have just developed WeChat mini programs, so I won’t go into details here.
[Related learning recommendations:小program development tutorial]
The above is the detailed content of A brief analysis of how to solve the reLaunch jump error in the mini program. For more information, please follow other related articles on the PHP Chinese website!