Change for process.cwd() and package.json updates. #4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When starting devurl daemon with v12.8.0, following error was being thrown:
TypeError [ERR_INVALID_ARG_TYPE]: The "options.cwd" property must be of type string. Received function wrappedCwd at normalizeSpawnArguments (child_process.js:430:11) at spawn (child_process.js:542:16) at spawnDemon (/Users/hal/data/github/devurl/lib/controller.js:59:15) at /Users/hal/data/github/devurl/lib/controller.js:79:7 at /Users/hal/data/github/devurl/node_modules/underscore/underscore.js:953:21 at Timeout._onTimeout (/Users/hal/data/github/devurl/lib/controller.js:23:5) at listOnTimeout (internal/timers.js:549:17) at processTimers (internal/timers.js:492:7) { code: 'ERR_INVALID_ARG_TYPE' }
Problem was due to use of
process.cwd
rather thanprocess.cwd()
incontroller.js
(but not sure how it worked previously?)Had to upgrade to latest versions of eslint and mocha to overcome NPM vulnerability warnings.
Changing versions of mocha lead to problem where mocha did not exit. I think this is due to
close
not being called for thereq
axon socket incontroller.js
but it would require more changes to fix that as the socker is a global variable that is set when the module is loaded. Therefore, just added--exit
to mocha script (similar issue here)