Contribute¶
This documentation describes some tips for helping contribute to both frontend and backend of InvenioILS.
Develop React-invenio-app-ils as a npm linked library¶
- Setup react-invenio-app-ils ready for development
cd <react-invenio-app-ils dir>
npm install
npm run lib-build
- Link the distribution (the scripts are already provided in package.json) and refresh on changes - it will build your dist folder
cd <react-invenio-app-ils dir>
npm link
npm run watch
- Go to your app, where you specified react-invenio-app-ils as your dependency and link the locally developed react-invenio-app-il
cd <my-react-app>
npm install
npm link @inveniosoftware/react-invenio-app-ils
Recreate the demo data from scratch¶
You can recreate the demo data whenever you need. WARNING: this process will destroy any data or user that you have created or modified.
- Make sure all services are up and running
- Run again
./scripts/setup
in your virtualenv:
cd <my directory e.g. myprojects>/invenioils/invenioils
pipenv run invenio setup --verbose
Troubleshooting FAQ¶
UI network errors¶
If you are seeing in your application UI errors:
Something went wrong
Network Error
You can find out more about the error by checking the console in your browser's developer tools.
Verify if:
- The backend server is running correctly (the console showing no exceptions)
- You have followed the installation guide
- the CORS policy is disabled for your local instance (not for any production environments!), see documentation above
- your browser has the exception for the https temporary certificate of the local instance, see documentation below
Browser certificate warning¶
The development server does not provide a valid HTTPS certificate. When opening the webpage of InvenioILS the first time, the browser will show you a warning: this is normal and expected for a local development environment.
- In your browser go to https://127.0.0.1:5000.
- You will see a warning about the invalid certificate: at this step, you will have to add the development certificate as trusted (
Accept
button orProceed to 127.0.0.1 (unsafe)
link). This process varies depending on the browser. - Reload the webpage if needed.