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.
Do I need to configure a local database for testing?
No, while the test command points to a local database, vly-test
, this is actually an in-memory database that is created during execution of the test script for the purpose
of running the tests. You don't need to do anything but run the test script by typing "npm run test
".
My module page works except when I force a reload.
App uses server side rendering, so when a forced reload is requested the page is fully rendered server side. Normally only the first page is rendered and others are loaded dynamically.
The difference is whether the page has requested data to be loaded into the store from the client side or the server side.
The first place to check for problems is in the routes.js file.
if (process.env.NODE_ENV !== 'production') { // Require async routes only in development for react-hot-reloader to work. require('./modules/Post/pages/PostListPage/PostListPage');
Make sure that you have required all your module pages that are liable to be reloaded from the browser. i.e pages rather than components.
You may see this type of warning
Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports. in PersonUpdatePage in Connect(PersonUpdatePage) in withRouter(Connect(PersonUpdatePage))
I'm on a Mac, and running 'mongod' seems to be erroring out?
The solution may be found here; the problem may be that you aren't pointing to an existing /data/db folder.
To do this, run the command as follows: 'mongod
--dbpath <absolute path to /data/db folder within vly1 repo>
' (E.g for me it was 'mongod
--dbpath ~/Documents/workspace/vly1/data/db/').
What is this Redux debug sidebar ?
This is included in client/store.js. and comes from client/modules/App/components/DevTools.js
There are mutiple tools in the dock
It shows a log of states and actions, and lets you change their history.
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 ). See this page for further details: https://stackoverflow.com/questions/23695676/mongoosejs-cant-disable-unique-to-field
Add Comment