Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This page contains a list of common questions that new contributors might have when getting started, and hopefully provides useful answers.
This list is a work in progress, please feel free to add anything that new contributors might find useful.

...

There are mutiple tools in the dock

LogMonitor
The default monitor for Redux DevTools with a tree view.
It shows a log of states and actions, and lets you change their history.
This is wrapped in DockMonitor to create the sidebar.
toggleVisibilityKey="ctrl-h"
changePositionKey="ctrl-w"
defaultSize="0.2"

Getting "E11000 duplicate key" errors with MongoDB

This error can occur when you try and insert a record when an index field is "left over" that shouldn't be there. These can remain even if you update the Schema. You'll need to manually clear the offending index in your database (or just drop the database (smile) ). See this page for further details: https://stackoverflow.com/questions/23695676/mongoosejs-cant-disable-unique-to-field



AVA **/file no longer works

Ava - the test runner we use in npm test used to take glob wild cards like **/OpDetails.spec.js  which would find the file in any folder.   In the upgrade to v4 this was removed.  Instead you have to specify a complete path to the target file.

On Mac and Linux you can use the back tick to generate the appropriate list of files into the command line

Code Block
npm test `**/OpDetail*.spec`

> @voluntarily/vly2@1.0.0 test /Users/watkinsav/workspace/voluntarily/vly2
> cross-env NODE_ENV=test PORT=8080 node_modules/.bin/nyc node --no-deprecation node_modules/ava/cli.js "components/Op/__tests__/OpDetail.spec.js" "components/Op/__tests__/OpDetailForm.spec.js" "components/Op/__tests__/OpDetailTagsEditable.spec.js"