Setting Up development environment


#1

I’m trying to to set up a development environment, but i have some errors when execute docker-compose up.

I enable the next line in the docker-compose file

Dev: Use live source directories from the host machine._

  • …/kpi:/srv/src/kpi_

The path …/kpi is the path where clone the code from Github, but when i execute the docker-compose up command, i get the error:

kpi_1             | > kpi@0.1.1 build /srv/src/kpi
kpi_1             | > webpack --config webpack/prod.config.js --progress --colors
kpi_1             |  
kpi_1             |  70% sealing WHash: d4a81473f414483810fb                                             
kpi_1             | Version: webpack 4.25.1
kpi_1             | Time: 47152ms
kpi_1             | Built at: 2019-01-04 15:57:55
kpi_1             |  43 assets
kpi_1             | Entrypoint app = app-d4a81473f414483810fb.js
kpi_1             | Entrypoint tests = tests-d4a81473f414483810fb.js
kpi_1             |  [469] ./jsapp/js/main.es6 2.66 KiB {0} [built]
kpi_1             |  [470] ./jsapp/js/app.es6 19.9 KiB {0} [built]
kpi_1             |  [725] ./jsapp/js/registrationPasswordApp.es6 3.62 KiB {0} [built]
kpi_1             |  [934] ./jsapp/scss/main.scss 1.42 KiB {0} [built]
kpi_1             |  [976] ./test/index.js 777 bytes {1} [built]
kpi_1             |  [999] ./test/xlform/aliases.tests.coffee 3.07 KiB {1} [built]
kpi_1             | [1000] ./test/xlform/choices.tests.coffee 6.36 KiB {1} [built]
kpi_1             | [1001] ./test/xlform/csv.tests.coffee 4.59 KiB {1} [built]
kpi_1             | [1002] ./test/xlform/deserializer.tests.coffee 4.07 KiB {1} [built]
kpi_1             | [1003] ./test/xlform/group.tests.coffee 21.2 KiB {1} [built]
kpi_1             | [1004] ./test/xlform/inputParser.tests.coffee 5.54 KiB {1} [built]
kpi_1             | [1005] ./test/xlform/translations.tests.coffee 991 bytes {1} [built]
kpi_1             | [1006] ./test/xlform/model.tests.coffee 16.6 KiB {1} [built]
kpi_1             | [1007] ./test/xlform/survey.tests.coffee 10.9 KiB {1} [built]
kpi_1             | [1008] ./test/xlform/utils.tests.coffee 5.88 KiB {1} [built]
kpi_1             |     + 996 hidden modules
kpi_1             |  
kpi_1             | ERROR in ./jsapp/js/components/passwordStrength.es6
kpi_1             | Module not found: Error: Can’t resolve ‘zxcvbn’ in ‘/srv/src/kpi/jsapp/js/components’
kpi_1             |  @ ./jsapp/js/components/passwordStrength.es6 17:14-31
kpi_1             |  @ ./jsapp/js/registrationPasswordApp.es6
kpi_1             |  @ ./jsapp/js/main.es6
kpi_1 npm ERR! code ELIFECYCLE                                      
kpi_1             | npm ERR! errno 2
kpi_1             | npm ERR! kpi@0.1.1 build: webpack --config webpack/prod.config.js --progress --colors
kpi_1             | npm ERR! Exit status 2
kpi_1             | npm ERR!  
kpi_1             | npm ERR! Failed at the kpi@0.1.1 build script.
kpi_1             | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
kpi_1             |  
kpi_1             | npm ERR! A complete log of this run can be found in:
kpi_1             | npm ERR!     /root/.npm/_logs/2019-01-04T15_57_55_624Z-debug.log
kpi_1             | *** /etc/my_init.d/10_init_kpi.bash failed with status 2
kpi_1             |

There is any guide for setting up a development environment?

Thank you for your attention and greetings from Ecuador,
MTR