diff --git a/docs/TROUBLESHOOTING.md b/docs/TROUBLESHOOTING.md index 1bb4bed1ce..3498b03969 100644 --- a/docs/TROUBLESHOOTING.md +++ b/docs/TROUBLESHOOTING.md @@ -5,13 +5,14 @@ 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. +Running tests locally requires `node` to specifically be of version `12.18.4`. You can use `nvm` to manually set the node version. ### [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 +nvm use 12.18.4 rm -r node_modules npm install ``` diff --git a/package.json b/package.json index 9ee959132d..6275f1290f 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "url": "https://github.com/datagovsg/formsg.git" }, "engines": { - "node": "~12.18.0", + "node": "~12.18.4", "npm": "~6.4.0" }, "scripts": {