Ghost Run -D throws typeError

Getting this on a local install. Not sure if this is a bug, but it seems like it might be. Any insight would be appreciated.

I have the latest version of ghost, the appropriate node version, and the latest version of the CLI installed. Have run ghost doctor with no issues.

I’m having issues with the CLI when trying to run ghost in debug mode (ghost run -d):

A promise was rejected but did not have a .catch() handler:
TypeError [ERR_INVALID_ARG_TYPE]: The “path” argument must be of type string. Received type boolean (true)
at new NodeError (node:internal/errors:393:5)
at validateString (node:internal/validators:163:11)
at Object.resolve (node:path:1098:7)
at RunCommand._run (/usr/local/lib/node_modules/ghost-cli/lib/command.js:124:30)
at Object.handler (/usr/local/lib/node_modules/ghost-cli/lib/command.js:60:22)
at /usr/local/lib/node_modules/ghost-cli/node_modules/yargs/build/index.cjs:1:8993
at j (/usr/local/lib/node_modules/ghost-cli/node_modules/yargs/build/index.cjs:1:4956)
at _.handleValidationAndGetResult (/usr/local/lib/node_modules/ghost-cli/node_modules/yargs/build/index.cjs:1:8962)
at _.applyMiddlewareAndGetResult (/usr/local/lib/node_modules/ghost-cli/node_modules/yargs/build/index.cjs:1:9604)
at _.runCommand (/usr/local/lib/node_modules/ghost-cli/node_modules/yargs/build/index.cjs:1:7231)
at [runYargsParserAndExecuteCommands] (/usr/local/lib/node_modules/ghost-cli/node_modules/yargs/build/index.cjs:1:58539)
at te.parse (/usr/local/lib/node_modules/ghost-cli/node_modules/yargs/build/index.cjs:1:40478)
at Object.run (/usr/local/lib/node_modules/ghost-cli/lib/bootstrap.js:184:14)
at Object. (/usr/local/lib/node_modules/ghost-cli/bin/ghost:16:11)
at Module._compile (node:internal/modules/cjs/loader:1159:14)
at Module._extensions…js (node:internal/modules/cjs/loader:1213:10)
/usr/local/lib/node_modules/ghost-cli/lib/bootstrap.js:29
throw reason;
^

TypeError [ERR_INVALID_ARG_TYPE]: The “path” argument must be of type string. Received type boolean (true)
at new NodeError (node:internal/errors:393:5)
at validateString (node:internal/validators:163:11)
at Object.resolve (node:path:1098:7)
at RunCommand._run (/usr/local/lib/node_modules/ghost-cli/lib/command.js:124:30)
at Object.handler (/usr/local/lib/node_modules/ghost-cli/lib/command.js:60:22)
at /usr/local/lib/node_modules/ghost-cli/node_modules/yargs/build/index.cjs:1:8993
at j (/usr/local/lib/node_modules/ghost-cli/node_modules/yargs/build/index.cjs:1:4956)
at _.handleValidationAndGetResult (/usr/local/lib/node_modules/ghost-cli/node_modules/yargs/build/index.cjs:1:8962)
at _.applyMiddlewareAndGetResult (/usr/local/lib/node_modules/ghost-cli/node_modules/yargs/build/index.cjs:1:9604)
at _.runCommand (/usr/local/lib/node_modules/ghost-cli/node_modules/yargs/build/index.cjs:1:7231)
at [runYargsParserAndExecuteCommands] (/usr/local/lib/node_modules/ghost-cli/node_modules/yargs/build/index.cjs:1:58539)
at te.parse (/usr/local/lib/node_modules/ghost-cli/node_modules/yargs/build/index.cjs:1:40478)
at Object.run (/usr/local/lib/node_modules/ghost-cli/lib/bootstrap.js:184:14)
at Object. (/usr/local/lib/node_modules/ghost-cli/bin/ghost:16:11)
at Module._compile (node:internal/modules/cjs/loader:1159:14)
at Module._extensions…js (node:internal/modules/cjs/loader:1213:10) {
code: ‘ERR_INVALID_ARG_TYPE’
}

Node.js v18.12.1

Try ghost run -D; -d is short for --dir, the ghost {x} -d behavior should be fixed :slight_smile:

2 Likes

That worked! Thank you

Thanks for reporting, I’ve created a pull request to warn about this :slight_smile:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.