Build Errors in Development Environment

Hello,

I am looking to contriubute to the ReasonML track and update the docs. I have hit a stumbling block though when setting it up locally.

Running the commands required to get started gives the follwing errors:

make
make -s check-package-files
Validation package.json files...
./exercises/practice/flower-field/package.json does not match main package.json.  Please run 'make sync-package-files' locally and commit the results.
make[1]: *** [Makefile:52: check-package-files] Error 1
make: *** [Makefile:62: test] Error 2
make sync-package-files 
Syncing package.json and package-lock.json...
cp: cannot create regular file 'exercises/practice/practice/package.json': No such file or directory
make[1]: *** [Makefile:41: copy-package-file] Error 1
make: *** [Makefile:47: sync-package-files] Error 1

Has anyone had any luck setting this up recently? Any tips on how to commence would be appreciated.

Thanks

The flower-field package.json file did match originally in Add `flower-field` by BNAndras · Pull Request #347 · exercism/reasonml · GitHub since I copied the files for the existing minesweeper implementation. Dependabot then bumped the @glennsl/bs-jest dependency from ^0.5.1 to ^0.7.0 for the new exercise so that probably is the reason its package.json file doesn’t match the one at the root of the repo.

As for make sync-package-files, the problem is in reasonml/Makefile at 9ab0250b0429e0514883e708b390fc4cf3fe55c0 · exercism/reasonml · GitHub. -f3 should be -f4 so we’re grabbing “flower-field” and not “practice” from the folder structure. This issue was introduced in [v3] Move Practice Exercise example files to .meta directory by ErikSchierboom · Pull Request #131 · exercism/reasonml · GitHub.

However, the root-level package.json file is five years old so I’d probably take a minute to update that first before you sync the package files. Otherwise, Dependabot is going to end up sending the cross-track reviewer team a lot of dependency upgrade PRs the next time that bot triggers.

You might be able to use the existing package.json from flower-field for that.

The other curious thing I noticed is bsconfig.json is in every exercise folder and at the root of the repo. That’s not currently synced by sync-package-files, but maybe it should? I don’t know ReasonML though.

thank you for your detailed reply. I will look into trying to get this process streamlined and working fine, before updating docs and submitting exercises.

1 Like

Fix build by TheRealOwenRees · Pull Request #368 · exercism/reasonml · GitHub is merged.

1 Like

Thanks for your help!