If I ran bulkmail in a folder which is not bulk-mail-cli, i.e Desktop or Documents,
I see this error:
(node:1330) UnhandledPromiseRejectionWarning: Error: Cannot find module '/Users/iqubex/Desktop/.config/settings.json'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:20:18)
at new BulkMailCli_settings (/Users/iqubex/Sites/bulk-mail-cli/src/dist/src/utils/settings.util.js:45:24)
at _callee$ (/Users/iqubex/Sites/bulk-mail-cli/src/dist/src/utils/settings.util.js:97:44)
at tryCatch (/Users/iqubex/Sites/bulk-mail-cli/node_modules/regenerator-runtime/runtime.js:62:40)
at Generator.invoke [as _invoke] (/Users/iqubex/Sites/bulk-mail-cli/node_modules/regenerator-runtime/runtime.js:296:22)
at Generator.prototype.(anonymous function) [as next] (/Users/iqubex/Sites/bulk-mail-cli/node_modules/regenerator-runtime/runtime.js:114:21)
at step (/Users/iqubex/Sites/bulk-mail-cli/src/dist/src/utils/settings.util.js:17:191)
(node:1330) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:1330) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
It is probably because of the use of process.cwd() method for assigning the SETTINGS_PATH variable.
If I ran
bulkmail
in a folder which is notbulk-mail-cli
, i.e Desktop or Documents,I see this error:
It is probably because of the use of
process.cwd()
method for assigning theSETTINGS_PATH
variable.THIS IS SO SILLY BUG!!