A brief analysis of how to solve the reLaunch jump error in the mini program

青灯夜游
Release: 2021-12-01 09:59:57
forward
3296 people have browsed it

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!

A brief analysis of how to solve the reLaunch jump error in the mini program

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.

Error message

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
Copy after login

A brief analysis of how to solve the reLaunch jump error in the mini program

Analysis

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.

Solution

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:

A brief analysis of how to solve the reLaunch jump error in the mini program

A brief analysis of how to solve the reLaunch jump error in the mini programThrough 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.

Finally

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!

Related labels:
source:juejin.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template