Type errors are divided into two types: fixed error code errors and scenario-related errors.
This type of error can be clearly captured in the code, and a fixed error code is assigned to each error. The error code consists of the error type and ID, such as TYPE-001
. You can find the specified page based on the error code to understand the cause of the error and the solution.
This type of error is generated based on the user's specific scenario and has no fixed error code. The error message and handling method will vary depending on the scenario.
Phenomenon description
The type generated by the producer contains aliases and cannot be processed normally in the consumer.
How to solve
Install typescript-transform-paths and ts-patch
Apply typescript-transform-paths
in tsconfig.json
tspc
(ts-patch
cli)Phenomenon description
The types generated by the producer are successfully generated, the consumer log shows that the types are successfully processed, but the @mf-types
directory does not update.
The issue can be a proxy configuration problem not allowing the resource to be downloaded.
How to solve
@mf-types
directory is generated in the dist
directory of the producer.TLS
or SSL
.TLS
certification for your local environment.NODE_TLS_REJECT_UNAUTHORIZED=0
to ignore the TLS
or SSL
errors. This will allow the @mf-types.zip
to be properly handled.Only set NODE_TLS_REJECT_UNAUTHORIZED=0 in your local development environment. It is not meant for production use. If you go this route, please make sure to commit the generated types to your repository.