Project Description:
PC management background, mostly form submission, query, details
Framework react + react – redux + react – the router + react – loadable
Fault: After login, the management information page is loading and no interface is requested
Premise: There was no problem with the last version, the requirement of this modification is just to add a data in a radio button, and there is a problem with the test line again. At present, the three test lines have the same problem, and the same error will occur even without modification
As shown in the figure, the other three routes are accessible without problems
Solution steps:
The first step
This release I only add radio drop-down options document, does not affect environmental problems, judgment is not their own problem
The second step
I need to find out why the release kept loading. Even if I did not modify the code, the release kept loading. Is there something wrong with the environment?
Operation and maintenance could not find the problem
The third step
There was no problem with launching the project locally, but there was a problem with publishing the DIST online. Then I packaged the DIST locally and let the operation and maintenance directly throw it on the server, so the page could be accessed normally. Then the operation and maintenance packaged it locally and threw it on the server, but it couldn’t
The fourth step
Since I have little experience in React, I consulted my colleagues
Step 5
A react-loadable page that is lazily loaded will always report an error. Therefore, the page has a problem, while the other pages have no problem. I will compare the other pages with the form
Currently, there are four components introduced into use, and it is normal to lose local packaging on the server, so look for the project code during operation and maintenance deployment and the packaged files.
Next annotate components locally separately to package local access (CD Build && HS)
The error message is as follows:
There was no problem with the project. At first, I thought there was a problem with the upload parameter. I directly introduced the tag, but it still couldn’t work without passing in any parameters, so I concluded that it was the tag of Upload
Step 6
The node_modules version is [email protected]
Package. Json {“antd”: “^3.22.1”}
Why node_modules is [email protected], can find NPM dependency package version number ~ and ^ article
The version of node_modules will be updated when NPM install is released. The loading version is [email protected], so check antd’s git address:
Github.com/ant-design/… .
So update the [email protected] version number
Package. json file {“antd”: “@3.26.17”}, so far I just write it to death, because this is the latest package in 3.0, local packaging test passed, release environment test passed.
Currently, I have gone through these steps to find problems. Actually, DUE to my limitations, I have gone through many pits. Do you have a good solution to my problem