Tagged: node

0

How to run node script from BASH?

Below shell script is running a node script, which gets an object from package.json, updates the app version and writes it back to the package.json using node API. // foo.sh node <<EOF var fs...

0

Debug mocha using visual studio code

Add the following configuration in your launch.json { “name”: “Run mocha”, “type”: “node”, “request”: “launch”, “program”: “${workspaceRoot}/node_modules/mocha/bin/mocha”, “stopOnEntry”: false, “args”: [ “test/**/*.js”, “–inspect”, “–debug-brk”, “–no-timeouts” ], “cwd”: “${workspaceRoot}”, “runtimeExecutable”: null, “env”: { “NODE_ENV”: “testing”...

0

Call and retry last Allocation failed

Solution: node –max–old-space-size=4096 <filename> You need to tell node to overwrite default heap size in v8. To see all the available v8 flags run the following command: node –v8-options —Further details on chromium bug

0

Error: listen EADDRINUSE

EADDRINUSE – stands for error: address already in use. It means you have a server listening on the same port. To solve this problem you have to kill the process running on that port....