openIMIS's Tips
Tips for Deploying openIMIS and Fixing Common Bugs
During openIMIS setup and development, a few recurring issues can arise.
Here are some practical tips to solve them.
1. Admin Login Fails (Immediate Logout After Login)
If the admin login (e.g., Admin / admin123) appears to work but you are logged out immediately, it is often due to CSRF or CORS host restrictions.
Make sure your host or domain is correctly added to the following variables in your .env file (or equivalent settings):
HOSTSALLOWED_HOSTSCSRF_TRUSTED_ORIGINS
This ensures that your domain is recognized and allowed by the backend.
2. Installing and Linking a Language Module
When linking a local language module, follow the instructions in the README.md file of the openimis-fe_js repository carefully.
If you encounter an error like:
Failed to load module "@openimis/fe-language_fr".
More details can be found in the developer console.
TypeError: __webpack_require__(...).LanguageModule is not a functionThe issue is usually that the exported name in your module’s index.js (or equivalent) does not match what the main project expects.
Simply adjust your export to match the expected LanguageModule function or object.
3. Running Backend + Database + Services in Containers, but Frontend Outside Docker
If you want to run the frontend in development mode after deploying openIMIS via openimis-dist_dkr:
Install project dependencies in your
openimis-fe_jsfolder.Update the
package.jsonAPI config so that the frontend can resolve the backend URL correctly.
Change:
"api": {
"base": "/api",
"target": "http://backend:8000"
}to:
"api": {
"base": "/api",
"target": "http://localhost:8000"
}The reason: "backend" is a hostname only resolvable inside Docker. From outside Docker, you must use localhost.
4. <IntlProvider> Missing Error
If you get an error about a missing intl object, you likely need to wrap your rendered content in the IntlProvider.
This is usually done in index.js of the openimis-fe_js project, ensuring all components have access to internationalization.
Did you encounter a problem or do you have a suggestion?
Please contact our Service Desk
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. https://creativecommons.org/licenses/by-sa/4.0/