Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config changes for OpenHIM to CHT communication #13

Closed
njogz opened this issue Jan 24, 2023 · 8 comments · Fixed by #16
Closed

Config changes for OpenHIM to CHT communication #13

njogz opened this issue Jan 24, 2023 · 8 comments · Fixed by #16
Assignees

Comments

@njogz
Copy link
Contributor

njogz commented Jan 24, 2023

Add the required forms and tasks to enable communication between the CHT and the OpenHIM mediator

@lorerod
Copy link
Contributor

lorerod commented Feb 15, 2023

@njogz I'm getting: ERROR Webpack warnings when building contact-summary when trying to compile and upload the configuration to my local CHT-core instance.

Environment: MacOS 13.1 (22C65); Docker desktop 4.15.0 (93002)l; Docker engine: 20.10.21
CHT 4.1.0: Local using docker compose files cht-core.yml and cht-couchdb.yml
cht version: 3.15.2

Followed the instructions:

  1. Go into the cht-config directory by running cd cht-config.
  2. Run npm install to install the dependencies.
  3. Run cht --url=https://medic:****@****.my.local-ip.co --accept-self-signed-certs

Log:

INFO Checking that https://medic:****@****.my.local-ip.co/medic/ is available... 
(node:2411) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
(Use `node --trace-warnings ...` to show where the warning was created)
INFO Processing config in cht-config. 
INFO Actions:
     - check-git
     - compile-app-settings
     - backup-app-settings
     - upload-app-settings
     - convert-app-forms
     - convert-collect-forms
     - convert-contact-forms
     - validate-app-forms
     - validate-collect-forms
     - validate-contact-forms
     - backup-all-forms
     - delete-all-forms
     - upload-app-forms
     - upload-collect-forms
     - upload-contact-forms
     - upload-resources
     - upload-branding
     - upload-partners
     - upload-custom-translations
     - upload-privacy-policies 
INFO Starting action: check-git… 
WARN There are changes in your local branch to be committed or not staged for commit. 
WARN Changes untracked or to be committed:
 M cht-config/package-lock.json
 
Are you sure you want to continue? [y/n]: y
INFO Fetching git upstream... 
INFO check-git complete. 
INFO Starting action: compile-app-settings… 
WARN app_settings.json file should not be edited directly.
    Please create a base_settings.json file in app_settings folder and move any manually defined configurations there. 
INFO Packaging contact-summary 
INFO Hash: b19913ebf5c6e3563270
Version: webpack 4.46.0
Child
    Hash: b19913ebf5c6e3563270
    Time: 1634ms
    Built at: 02/15/2023 1:00:08 PM
                   Asset    Size  Chunks             Chunk Names
    ./contact-summary.js  68 KiB       0  [emitted]  main
    Entrypoint main = ./contact-summary.js
    [0] ./node_modules/moment/moment.js 147 KiB {0} [built]
    [1] /Users/marialorenarodriguezviruel/.nvm/versions/node/v16.17.1/lib/node_modules/cht-conf/src/contact-summary/lib.js 203 bytes {0} [built]
    [2] ./contact-summary.templated.js 15.8 KiB {0} [built] [1 warning]
    [3] (webpack)/buildin/module.js 497 bytes {0} [built]
    [4] ./contact-summary-extras.js 15.9 KiB {0} [built] [1 warning]
    [5] /Users/marialorenarodriguezviruel/.nvm/versions/node/v16.17.1/lib/node_modules/cht-conf/src/contact-summary/contact-summary-emitter.js 3.41 KiB {0} [built]
    
    WARNING in ./contact-summary.templated.js
    Module Warning (from /Users/marialorenarodriguezviruel/.nvm/versions/node/v16.17.1/lib/node_modules/cht-conf/node_modules/eslint-loader/dist/cjs.js):
    Failed to load config "@medic" to extend from.
    Referenced from: /Users/marialorenarodriguezviruel/medic-workspace/interoperability/cht-config/.eslintrc
     @ /Users/marialorenarodriguezviruel/.nvm/versions/node/v16.17.1/lib/node_modules/cht-conf/src/contact-summary/lib.js 1:21-60
    
    WARNING in ./contact-summary-extras.js
    Module Warning (from /Users/marialorenarodriguezviruel/.nvm/versions/node/v16.17.1/lib/node_modules/cht-conf/node_modules/eslint-loader/dist/cjs.js):
    Failed to load config "@medic" to extend from.
    Referenced from: /Users/marialorenarodriguezviruel/medic-workspace/interoperability/cht-config/.eslintrc
     @ ./contact-summary.templated.js 2:15-50
     @ /Users/marialorenarodriguezviruel/.nvm/versions/node/v16.17.1/lib/node_modules/cht-conf/src/contact-summary/lib.js 
INFO Error: Webpack warnings when building contact-summary
    at /Users/marialorenarodriguezviruel/.nvm/versions/node/v16.17.1/lib/node_modules/cht-conf/src/lib/package-lib.js:103:23
    at finalCallback (/Users/marialorenarodriguezviruel/.nvm/versions/node/v16.17.1/lib/node_modules/cht-conf/node_modules/webpack/lib/MultiCompiler.js:254:12)
    at /Users/marialorenarodriguezviruel/.nvm/versions/node/v16.17.1/lib/node_modules/cht-conf/node_modules/webpack/lib/MultiCompiler.js:277:6
    at done (/Users/marialorenarodriguezviruel/.nvm/versions/node/v16.17.1/lib/node_modules/cht-conf/node_modules/neo-async/async.js:2931:13)
    at runCompilers (/Users/marialorenarodriguezviruel/.nvm/versions/node/v16.17.1/lib/node_modules/cht-conf/node_modules/webpack/lib/MultiCompiler.js:181:48)
    at /Users/marialorenarodriguezviruel/.nvm/versions/node/v16.17.1/lib/node_modules/cht-conf/node_modules/webpack/lib/MultiCompiler.js:188:7
    at /Users/marialorenarodriguezviruel/.nvm/versions/node/v16.17.1/lib/node_modules/cht-conf/node_modules/webpack/lib/MultiCompiler.js:270:7
    at finalCallback (/Users/marialorenarodriguezviruel/.nvm/versions/node/v16.17.1/lib/node_modules/cht-conf/node_modules/webpack/lib/Compiler.js:257:39)
    at /Users/marialorenarodriguezviruel/.nvm/versions/node/v16.17.1/lib/node_modules/cht-conf/node_modules/webpack/lib/Compiler.js:306:14
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/marialorenarodriguezviruel/.nvm/versions/node/v16.17.1/lib/node_modules/cht-conf/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
    at AsyncSeriesHook.lazyCompileHook (/Users/marialorenarodriguezviruel/.nvm/versions/node/v16.17.1/lib/node_modules/cht-conf/node_modules/tapable/lib/Hook.js:154:20)
    at /Users/marialorenarodriguezviruel/.nvm/versions/node/v16.17.1/lib/node_modules/cht-conf/node_modules/webpack/lib/Compiler.js:304:22
    at Compiler.emitRecords (/Users/marialorenarodriguezviruel/.nvm/versions/node/v16.17.1/lib/node_modules/cht-conf/node_modules/webpack/lib/Compiler.js:499:39)
    at /Users/marialorenarodriguezviruel/.nvm/versions/node/v16.17.1/lib/node_modules/cht-conf/node_modules/webpack/lib/Compiler.js:298:10
    at /Users/marialorenarodriguezviruel/.nvm/versions/node/v16.17.1/lib/node_modules/cht-conf/node_modules/webpack/lib/Compiler.js:485:14
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/marialorenarodriguezviruel/.nvm/versions/node/v16.17.1/lib/node_modules/cht-conf/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1) 
ERROR Webpack warnings when building contact-summary 

Found in the docs this reference to the error and tried the step suggested. The error is still showing.

I also tried to compile and upload /cht-core/config/default, and it was successful.
What else can I try?

@Phil-Mwago
Copy link
Contributor

I got this error previously while trying to set up my local environment: See how I resolved it on the forum here.

@lorerod
Copy link
Contributor

lorerod commented Feb 20, 2023

@njogz @Phil-Mwago I was able to load the config to my local instance. But not following the README steps. @njogz are you able to load the config following the README steps?

This are the steps I followed:

  1. Created a directory outside the interoperability project
  2. Copied the content of /interoperability/cht-config to the directory created in 1.
  3. Executed cht initialise-project-layout
    Log:
ERROR Require exactly one of these parameter: --local --instance --url --archive 

NAME
  cht - Configure your CHT instances

SYNOPSIS
  cht <--local|--instance=instance-name|--url=url>
Or:
  cht <--local|--instance=instance-name|--url=url|--archive> <actions> <options> -- <params>

DESCRIPTION
  This script updates and uploads a project's configuration.

SUPPORTED ACTIONS
  * backup-all-forms
  * backup-app-settings
  * check-for-updates
  * check-git
  * compile-app-settings
  * compress-images
  * compress-pngs
  * compress-svgs
  * convert-app-forms
  * convert-collect-forms
  * convert-contact-forms
  * create-users
  * csv-to-docs
  * delete-all-forms
  * delete-forms
  * edit-contacts
  * fetch-csvs-from-google-drive
  * fetch-forms-from-google-drive
  * initialise-project-layout
  * move-contacts
  * upload-app-forms
  * upload-app-settings
  * upload-branding
  * upload-collect-forms
  * upload-contact-forms
  * upload-custom-translations
  * upload-docs
  * upload-partners
  * upload-privacy-policies
  * upload-resources
  * upload-sms-from-csv
  * validate-app-forms
  * validate-collect-forms
  * validate-contact-forms
  * watch-project

SAVE CONFIG TO
  --local
    Upload to http://admin:pass@localhost:5988

  --instance=<instance-name>
    Upload to https://admin:<password>@<instance-name>.medicmobile.org

  --user=<user-name> --instance <instance-name>
    Upload to https://<user-name>:<password>@<instance-name>.medicmobile.org

  --url=<url>
    Upload to URL specified.

  --archive
    Save configuration content to files on disk. Requires parameter --destination=<path to save files>.

OPTIONS
  --help
    Display this usage message

  --shell-completion
  --shell-completion=bash
    Generate the shell-completion script for use in bash.

  --source=<path to project folder>. Defaults to the working directory.

  --supported-actions
    Display a list of supported actions.

  --version
    Display the current version number.

  --changelog
    Display application changelog.

  --accept-self-signed-certs
    Allows cht-conf to work with self signed certs by telling node to ignore the error

  --skip-dependency-check
    Skips checking the version running is set to the same version in the package.json

  --skip-git-check
    Skips checking the status of the current repository that holds the configuration

  --skip-translation-check
    Skips checking message translations

  --skip-validate
    Skips form validation  

  --force
    CAN BE DANGEROUS! Passes yes to all commands and any where that would prompt to overwrite changes will overwrite automatically. 

INFO Processing config in cht-config. 
INFO Actions:
     - initialise-project-layout 
INFO Starting action: initialise-project-layout… 
INFO Initialising project at /Users/marialorenarodriguezviruel/medic-workspace/cht-config 
INFO initialise-project-layout complete. 
  1. Executed cht --url=https://medic:****@****.my.local-ip.co --accept-self-signed-certs
    Log:
INFO Checking that https://medic:****@192-168-100-62.my.local-ip.co/medic/ is available... 
(node:902) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
(Use `node --trace-warnings ...` to show where the warning was created)
INFO Processing config in cht-config. 
INFO Actions:
     - check-git
     - compile-app-settings
     - backup-app-settings
     - upload-app-settings
     - convert-app-forms
     - convert-collect-forms
     - convert-contact-forms
     - validate-app-forms
     - validate-collect-forms
     - validate-contact-forms
     - backup-all-forms
     - delete-all-forms
     - upload-app-forms
     - upload-collect-forms
     - upload-contact-forms
     - upload-resources
     - upload-branding
     - upload-partners
     - upload-custom-translations
     - upload-privacy-policies 
INFO Starting action: check-git… 
WARN git repository not found 
INFO check-git complete. 
INFO Starting action: compile-app-settings… 
INFO Packaging contact-summary 
INFO Hash: ddcdee4c0571538e78a0
Version: webpack 4.46.0
Child
    Hash: ddcdee4c0571538e78a0
    Time: 637ms
    Built at: 02/20/2023 11:49:52 AM
                   Asset      Size  Chunks             Chunk Names
    ./contact-summary.js  2.77 KiB       0  [emitted]  main
    Entrypoint main = ./contact-summary.js
    [0] /Users/marialorenarodriguezviruel/.nvm/versions/node/v16.17.1/lib/node_modules/cht-conf/src/contact-summary/lib.js 203 bytes {0} [built]
    [1] ./contact-summary.templated.js 62 bytes {0} [built]
    [2] /Users/marialorenarodriguezviruel/.nvm/versions/node/v16.17.1/lib/node_modules/cht-conf/src/contact-summary/contact-summary-emitter.js 3.41 KiB {0} [built] 
INFO Packaging nools 
INFO Hash: bd4ddc9925c989033d3f
Version: webpack 4.46.0
Child
    Hash: bd4ddc9925c989033d3f
    Time: 180ms
    Built at: 02/20/2023 11:49:52 AM
         Asset     Size  Chunks             Chunk Names
    ./nools.js  5.4 KiB       0  [emitted]  main
    Entrypoint main = ./nools.js
    [0] /Users/marialorenarodriguezviruel/.nvm/versions/node/v16.17.1/lib/node_modules/cht-conf/src/nools/definition-preparation.js 1.36 KiB {0} [built]
    [1] /Users/marialorenarodriguezviruel/.nvm/versions/node/v16.17.1/lib/node_modules/cht-conf/src/nools/lib.js 328 bytes {0} [built]
    [2] ./tasks.js 20 bytes {0} [built]
    [3] ./targets.js 20 bytes {0} [built]
    [4] /Users/marialorenarodriguezviruel/.nvm/versions/node/v16.17.1/lib/node_modules/cht-conf/src/nools/task-emitter.js 5.24 KiB {0} [built]
    [5] /Users/marialorenarodriguezviruel/.nvm/versions/node/v16.17.1/lib/node_modules/cht-conf/src/nools/task-defaults.js 1.32 KiB {0} [built]
    [6] /Users/marialorenarodriguezviruel/.nvm/versions/node/v16.17.1/lib/node_modules/cht-conf/src/nools/target-emitter.js 2.83 KiB {0} [built] 
INFO compile-app-settings complete. 
INFO Starting action: backup-app-settings… 
INFO backup-app-settings complete. 
INFO Starting action: upload-app-settings… 
INFO Settings not updated - no changes detected 
INFO upload-app-settings complete. 
INFO Starting action: convert-app-forms… 
INFO Converting form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/app/death_report.xlsx … 
Conversion complete!
INFO Converting form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/app/delivery.xlsx … 
Conversion complete!
INFO Converting form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/app/interop_follow_up.xlsx … 
Conversion complete!
INFO Converting form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/app/pnc_danger_sign_follow_up_baby.xlsx … 
Conversion complete!
INFO Converting form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/app/pnc_danger_sign_follow_up_mother.xlsx … 
Conversion complete!
INFO Converting form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/app/pregnancy.xlsx … 
Conversion complete!
INFO Converting form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/app/pregnancy_danger_sign.xlsx … 
Conversion complete!
INFO Converting form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/app/pregnancy_danger_sign_follow_up.xlsx … 
Conversion complete!
INFO Converting form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/app/pregnancy_facility_visit_reminder.xlsx … 
Conversion complete!
INFO Converting form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/app/pregnancy_home_visit.xlsx … 
Conversion complete!
INFO Converting form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/app/replace_user.xlsx … 
Conversion complete!
INFO Converting form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/app/undo_death_report.xlsx … 
Conversion complete!
INFO convert-app-forms complete. 
INFO Starting action: convert-collect-forms… 
INFO convert-collect-forms complete. 
INFO Starting action: convert-contact-forms… 
INFO Converting form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/contact/clinic-create.xlsx … 
Conversion complete!
INFO Converting form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/contact/clinic-edit.xlsx … 
Conversion complete!
INFO Converting form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/contact/district_hospital-create.xlsx … 
Conversion complete!
INFO Converting form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/contact/district_hospital-edit.xlsx … 
Conversion complete!
INFO Converting form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/contact/health_center-create.xlsx … 
Conversion complete!
INFO Converting form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/contact/health_center-edit.xlsx … 
Conversion complete!
INFO Converting form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/contact/person-create.xlsx … 
Conversion complete!
INFO Converting form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/contact/person-edit.xlsx … 
Conversion complete!
INFO convert-contact-forms complete. 
INFO Starting action: validate-app-forms… 
INFO Validating form: death_report.xml… 
INFO Validating form: delivery.xml… 
INFO Validating form: interop_follow_up.xml… 
INFO Validating form: pnc_danger_sign_follow_up_baby.xml… 
INFO Validating form: pnc_danger_sign_follow_up_mother.xml… 
INFO Validating form: pregnancy.xml… 
INFO Validating form: pregnancy_danger_sign.xml… 
INFO Validating form: pregnancy_danger_sign_follow_up.xml… 
INFO Validating form: pregnancy_facility_visit_reminder.xml… 
INFO Validating form: pregnancy_home_visit.xml… 
INFO Validating form: replace_user.xml… 
WARN Form at /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/app/replace_user.xml contains fields with the deprecated `horizontal`/`compact` appearance. These have been deprecated in favor of the `columns` appearance. Please update the following fields: 
WARN   - /replace_user/new_contact/ephemeral_dob/dob_method: replace [horizontal] with [columns] 
WARN   - /replace_user/new_contact/sex: replace [horizontal] with [columns] 
INFO Validating form: undo_death_report.xml… 
INFO validate-app-forms complete. 
INFO Starting action: validate-collect-forms… 
INFO validate-collect-forms complete. 
INFO Starting action: validate-contact-forms… 
INFO Validating form: clinic-create.xml… 
INFO Validating form: clinic-edit.xml… 
INFO Validating form: district_hospital-create.xml… 
INFO Validating form: district_hospital-edit.xml… 
INFO Validating form: health_center-create.xml… 
INFO Validating form: health_center-edit.xml… 
INFO Validating form: person-create.xml… 
INFO Validating form: person-edit.xml… 
INFO validate-contact-forms complete. 
INFO Starting action: backup-all-forms… 
INFO backup-all-forms complete. 
INFO Starting action: delete-all-forms… 
INFO delete-all-forms complete. 
INFO Starting action: upload-app-forms… 
INFO Preparing form for upload: death_report.xml… 
INFO No media directory found at /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/app/death_report-media for form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/app/death_report.xml 
INFO Form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/app/death_report.xml uploaded 
INFO Preparing form for upload: delivery.xml… 
INFO No media directory found at /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/app/delivery-media for form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/app/delivery.xml 
INFO Form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/app/delivery.xml uploaded 
INFO Preparing form for upload: interop_follow_up.xml… 
INFO No media directory found at /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/app/interop_follow_up-media for form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/app/interop_follow_up.xml 
INFO Form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/app/interop_follow_up.xml uploaded 
INFO Preparing form for upload: pnc_danger_sign_follow_up_baby.xml… 
INFO No media directory found at /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/app/pnc_danger_sign_follow_up_baby-media for form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/app/pnc_danger_sign_follow_up_baby.xml 
INFO Form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/app/pnc_danger_sign_follow_up_baby.xml uploaded 
INFO Preparing form for upload: pnc_danger_sign_follow_up_mother.xml… 
INFO No media directory found at /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/app/pnc_danger_sign_follow_up_mother-media for form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/app/pnc_danger_sign_follow_up_mother.xml 
INFO Form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/app/pnc_danger_sign_follow_up_mother.xml uploaded 
INFO Preparing form for upload: pregnancy.xml… 
INFO No media directory found at /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/app/pregnancy-media for form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/app/pregnancy.xml 
INFO Form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/app/pregnancy.xml uploaded 
INFO Preparing form for upload: pregnancy_danger_sign.xml… 
INFO No media directory found at /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/app/pregnancy_danger_sign-media for form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/app/pregnancy_danger_sign.xml 
INFO Form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/app/pregnancy_danger_sign.xml uploaded 
INFO Preparing form for upload: pregnancy_danger_sign_follow_up.xml… 
INFO No media directory found at /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/app/pregnancy_danger_sign_follow_up-media for form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/app/pregnancy_danger_sign_follow_up.xml 
INFO Form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/app/pregnancy_danger_sign_follow_up.xml uploaded 
INFO Preparing form for upload: pregnancy_facility_visit_reminder.xml… 
INFO No media directory found at /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/app/pregnancy_facility_visit_reminder-media for form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/app/pregnancy_facility_visit_reminder.xml 
INFO Form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/app/pregnancy_facility_visit_reminder.xml uploaded 
INFO Preparing form for upload: pregnancy_home_visit.xml… 
INFO No media directory found at /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/app/pregnancy_home_visit-media for form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/app/pregnancy_home_visit.xml 
INFO Form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/app/pregnancy_home_visit.xml uploaded 
INFO Preparing form for upload: replace_user.xml… 
INFO No media directory found at /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/app/replace_user-media for form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/app/replace_user.xml 
INFO Form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/app/replace_user.xml uploaded 
INFO Preparing form for upload: undo_death_report.xml… 
INFO No media directory found at /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/app/undo_death_report-media for form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/app/undo_death_report.xml 
INFO Form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/app/undo_death_report.xml uploaded 
INFO upload-app-forms complete. 
INFO Starting action: upload-collect-forms… 
INFO upload-collect-forms complete. 
INFO Starting action: upload-contact-forms… 
INFO Preparing form for upload: clinic-create.xml… 
INFO No media directory found at /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/contact/clinic-create-media for form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/contact/clinic-create.xml 
INFO Form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/contact/clinic-create.xml uploaded 
INFO Preparing form for upload: clinic-edit.xml… 
INFO No media directory found at /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/contact/clinic-edit-media for form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/contact/clinic-edit.xml 
INFO Form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/contact/clinic-edit.xml uploaded 
INFO Preparing form for upload: district_hospital-create.xml… 
INFO No media directory found at /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/contact/district_hospital-create-media for form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/contact/district_hospital-create.xml 
INFO Form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/contact/district_hospital-create.xml uploaded 
INFO Preparing form for upload: district_hospital-edit.xml… 
INFO No media directory found at /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/contact/district_hospital-edit-media for form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/contact/district_hospital-edit.xml 
INFO Form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/contact/district_hospital-edit.xml uploaded 
INFO Preparing form for upload: health_center-create.xml… 
INFO No media directory found at /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/contact/health_center-create-media for form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/contact/health_center-create.xml 
INFO Form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/contact/health_center-create.xml uploaded 
INFO Preparing form for upload: health_center-edit.xml… 
INFO No media directory found at /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/contact/health_center-edit-media for form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/contact/health_center-edit.xml 
INFO Form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/contact/health_center-edit.xml uploaded 
INFO Preparing form for upload: person-create.xml… 
INFO No media directory found at /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/contact/person-create-media for form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/contact/person-create.xml 
INFO Form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/contact/person-create.xml uploaded 
INFO Preparing form for upload: person-edit.xml… 
INFO No media directory found at /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/contact/person-edit-media for form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/contact/person-edit.xml 
INFO Form /Users/marialorenarodriguezviruel/medic-workspace/cht-config/forms/contact/person-edit.xml uploaded 
INFO upload-contact-forms complete. 
INFO Starting action: upload-resources… 
INFO Configuration not uploaded as no changes found 
INFO upload-resources complete. 
INFO Starting action: upload-branding… 
WARN No configuration file found at path: /Users/marialorenarodriguezviruel/medic-workspace/cht-config/branding.json 
INFO upload-branding complete. 
INFO Starting action: upload-partners… 
WARN No configuration file found at path: /Users/marialorenarodriguezviruel/medic-workspace/cht-config/partners.json 
INFO upload-partners complete. 
INFO Starting action: upload-custom-translations… 
WARN Empty message found for key 'report.delivery.babys_condition.baby_repeat' in 'en' translation 
WARN Empty message found for key 'report.delivery.pnc_visits.who_note' in 'en' translation 
WARN Empty message found for key 'report.pregnancy_facility_visit_reminder.facility_visit_reminder.remind_note' in 'en' translation 
WARN Empty message found for key 'report.pregnancy_danger_sign_follow_up.danger_signs.congratulate_no_ds_note' in 'en' translation 
WARN Empty message found for key 'report.pregnancy_home_visit.pregnancy_ended.miscarriage_note' in 'en' translation 
WARN Empty message found for key 'report.pregnancy.gestational_age.register_method.register_note' in 'en' translation 
WARN Empty message found for key 'report.pregnancy.gestational_age.method_lmp.u_lmp_date' in 'en' translation 
WARN Empty message found for key 'report.pregnancy.gestational_age.method_lmp.method_lmp' in 'en' translation 
WARN Found 8 empty messages trying to compile translations 
INFO Translation /Users/marialorenarodriguezviruel/medic-workspace/cht-config/translations/messages-en.properties not uploaded as no changes were found 
INFO upload-custom-translations complete. 
INFO Starting action: upload-privacy-policies… 
INFO Privacy policies file not uploaded as no changes found 
INFO upload-privacy-policies complete. 
INFO All actions completed. 

@andrablaj
Copy link
Member

andrablaj commented Feb 22, 2023

Here are the errors I encountered and the workarounds I identified in order to upload the config:

  1. By following the steps in the README, I got the same error as @lorerod.
  2. The problem seems to be the node version. I had to switch to v12 (I had v16 locally).
  3. The next error was:
Failed to load config "@medic" to extend from.
Referenced from: /Users/andra/Documents/GitHub/interoperability/cht-config/.eslintrc
 @ /opt/homebrew/lib/node_modules/cht-conf/src/contact-summary/lib.js 1:21-60
  1. I ran cht initialise-project-layout, before the cht --url ... command and got a different error, which seemed connected to es2018:
../.eslintrc:
	Environment key "es2018" is unknown
  1. I changed es2018 to es2020 in the .eslintrc file, and the error changed to:
/Users/andra/Documents/GitHub/interoperability/cht-config/contact-summary.templated.js
  5:3  error  Newline required at end of file but not found  eol-last
  1. I removed the "eol-last": 2, line in the .eslintrc file (or change it to "eol-last": 0,), and the config uploaded without any error.

@njogz @samuelimoisili did you bump into the same problems? If not, is there anything in the steps that I mentioned that is not done correctly, or anything I might have missed?

@samuelimoisili
Copy link
Contributor

samuelimoisili commented Feb 28, 2023

@andrablaj Yes, I faced the same issue. I'm creating a new PR to fix the bugs.

@andrablaj
Copy link
Member

andrablaj commented Feb 28, 2023

Thanks, @samuelimoisili. Is there any blocker to perform the fixes via this same branch? I am new to the repo so I might miss something.

@lorerod
Copy link
Contributor

lorerod commented Feb 28, 2023

I moved this issue back to In Progress @samuelimoisili. I think it is better for traceability if we continue with this same issue, but it could be in a different PR.

@njogz
Copy link
Contributor Author

njogz commented Mar 2, 2023

@andrablaj I have merged the fix by @samuelimoisili. Please pull the latest comment on the branch and test again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants