Skip to content

Commit

Permalink
Merge pull request #200 from opengovsg/release-v4.31.0
Browse files Browse the repository at this point in the history
feat: merge release v4.31.0 into master branch
  • Loading branch information
liangyuanruo authored Aug 25, 2020
2 parents d6550f5 + 8512707 commit 7849419
Show file tree
Hide file tree
Showing 20 changed files with 364 additions and 464 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ We provide a [`.template-env`](./.template-env) file with the secrets blanked ou
paste the variables described into a self-created `.env` file, replacing the
required values with your own.

### Trouble-shooting

You can consult [TROUBLESHOOTING.md](/docs/TROUBLESHOOTING.md) for common issues that developers face and how to resolve them.

## Testing

The docker environment has not been configured to run tests. Thus, you will need
Expand Down
24 changes: 24 additions & 0 deletions docs/TROUBLESHOOTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Troubleshooting issues on local development

A list of common issues that developers face and how to resolve them.

## `Error: Module did not self-register.`

This could happen if node modules were compiled with a different version of node, or if node modules fail to compile due to other configuration errors.

### [Configuration Errors](https://stackoverflow.com/questions/21656420/failed-to-load-c-bson-extension)

Some modules such as `node-gyp` require Python 2.x and if your system's Python points to 3.x, it will fail to compile bson, without warning. Fix this by setting Python 2.x to be the default on your system or ensuring that the Python global key in your npm config points to the 2.x executable on your system.

### [Node Versioning Error](https://stackoverflow.com/questions/28486891/uncaught-error-module-did-not-self-register)

Run the following commands to set the node version and then re-install the node modules:

```
nvm use 12.18.0
rm -r node_modules
npm install
```

## JavaScript out of memory error
On your Docker application, go to Preferences > Resources and increase the amount of memory allocated for Docker.
5 changes: 2 additions & 3 deletions jest-mongodb-config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
// This file is used to instantiate `@shelf/jest-db`'s setup.
module.exports = {
mongodbMemoryServerOptions: {
binary: {
version: process.env.MONGO_BINARY_VERSION || '3.6.12',
checkMD5: true,
},
instance: {
dbName: 'jest',
},
instance: {},
autoStart: false,
},
}
1 change: 0 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ const { defaults: tsJestPreset } = require('ts-jest/presets')

module.exports = {
preset: '@shelf/jest-mongodb',
testEnvironment: 'node',
testMatch: ['**/?(*.)+(spec|test).[t]s?(x)'],
modulePaths: ['<rootDir>'],
transform: {
Expand Down
Loading

0 comments on commit 7849419

Please sign in to comment.