Then I did try to run: ghost install --db=sqlite3 in an empty directory in order to install Ghost.
Unfortunately it gives me the following error message:
Checking system Node.js version
Checking current folder permissions
System checks failed with message: ‘Operating system is not Linux’
Some features of Ghost-CLI may not work without additional configuration.
For local installs we recommend using ghost install local instead.
? Continue anyway? Yes
System stack check skipped
Checking operating system compatibility [skipped]
Checking memory availability
Checking for latest Ghost version
Setting up install directory
Downloading and installing Ghost v3.18.1
A ProcessError occurred.
Message: Command failed: yarn install --no-emoji --no-progress
SyntaxError: Unknown token: { line: 1, col: 0, type: ‘INVALID’, value: undefined } 1:0 in /usr/local/share/.config/yarn
at Parser.unexpected (/usr/local/lib/node_modules/ghost-cli/node_modules/yarn/lib/cli.js:64332:11)
at Parser.parse (/usr/local/lib/node_modules/ghost-cli/node_modules/yarn/lib/cli.js:64463:14)
at parse (/usr/local/lib/node_modules/ghost-cli/node_modules/yarn/lib/cli.js:64537:21)
at module.exports.exports.default (/usr/local/lib/node_modules/ghost-cli/node_modules/yarn/lib/cli.js:64099:96)
at loadRcFile (/usr/local/lib/node_modules/ghost-cli/node_modules/yarn/lib/cli.js:56942:58)
at /usr/local/lib/node_modules/ghost-cli/node_modules/yarn/lib/cli.js:56916:14
at /usr/local/lib/node_modules/ghost-cli/node_modules/yarn/lib/cli.js:101331:14
at Array.map ()
at parseRcPaths (/usr/local/lib/node_modules/ghost-cli/node_modules/yarn/lib/cli.js:101329:78)
at Object.findRc (/usr/local/lib/node_modules/ghost-cli/node_modules/yarn/lib/cli.js:101343:10)
Thank you for your response. Basically I did clone the Ghost repo to install the Ghost CLI. Then I’ve created an empty folder in different location and I did run ‘ghost install’ in it. Do you still think cloning would be a problem here?
OK. So I have removed the cloned folder from the file system and ran:
npm install ghost-cli@latest -g
Then when I run: ghost install --db=sqlite3
I still get the same error. Following is the exception from the log file:
Blockquote
Debug Information:
OS: FreeBSD, v12.1
Node Version: v12.16.2
Ghost-CLI Version: 1.14.0
Environment: production
Command: ‘ghost install --db=sqlite3’
Message: Command failed: yarn install --no-emoji --no-progress
SyntaxError: Unknown token: { line: 1, col: 0, type: ‘INVALID’, value: undefined } 1:0 in /usr/local/share/.config/yarn
at Parser.unexpected (/usr/local/lib/node_modules/ghost-cli/node_modules/yarn/lib/cli.js:64332:11)
at Parser.parse (/usr/local/lib/node_modules/ghost-cli/node_modules/yarn/lib/cli.js:64463:14)
at parse (/usr/local/lib/node_modules/ghost-cli/node_modules/yarn/lib/cli.js:64537:21)
at module.exports.exports.default (/usr/local/lib/node_modules/ghost-cli/node_modules/yarn/lib/cli.js:64099:96)
at loadRcFile (/usr/local/lib/node_modules/ghost-cli/node_modules/yarn/lib/cli.js:56942:58)
at /usr/local/lib/node_modules/ghost-cli/node_modules/yarn/lib/cli.js:56916:14
at /usr/local/lib/node_modules/ghost-cli/node_modules/yarn/lib/cli.js:101331:14
at Array.map ()
at parseRcPaths (/usr/local/lib/node_modules/ghost-cli/node_modules/yarn/lib/cli.js:101329:78)
at Object.findRc (/usr/local/lib/node_modules/ghost-cli/node_modules/yarn/lib/cli.js:101343:10)
Exit code: 1
--------------- stderr ---------------
SyntaxError: Unknown token: { line: 1, col: 0, type: ‘INVALID’, value: undefined } 1:0 in /usr/local/share/.config/yarn
at Parser.unexpected (/usr/local/lib/node_modules/ghost-cli/node_modules/yarn/lib/cli.js:64332:11)
at Parser.parse (/usr/local/lib/node_modules/ghost-cli/node_modules/yarn/lib/cli.js:64463:14)
at parse (/usr/local/lib/node_modules/ghost-cli/node_modules/yarn/lib/cli.js:64537:21)
at module.exports.exports.default (/usr/local/lib/node_modules/ghost-cli/node_modules/yarn/lib/cli.js:64099:96)
at loadRcFile (/usr/local/lib/node_modules/ghost-cli/node_modules/yarn/lib/cli.js:56942:58)
at /usr/local/lib/node_modules/ghost-cli/node_modules/yarn/lib/cli.js:56916:14
at /usr/local/lib/node_modules/ghost-cli/node_modules/yarn/lib/cli.js:101331:14
at Array.map ()
at parseRcPaths (/usr/local/lib/node_modules/ghost-cli/node_modules/yarn/lib/cli.js:101329:78)
at Object.findRc (/usr/local/lib/node_modules/ghost-cli/node_modules/yarn/lib/cli.js:101343:10)
~/heavenbot/src/heaven_plugin ‹master*› $ ghost doctor
Checking system Node.js version
Checking current folder permissions
Validating config
Checking memory availability
Checking binary dependencies
One or more errors occurred.
I have a strange feeling this won’t be an easy one…
The thing is the config file is not even created during the installation.
When I run “ghost install --db=sqlite3” and it fails with the error posted above I end up with two directories in the installation folder and nothing else:
drwxr-xr-x 8 root wheel 8B Jun 9 09:17 content
drwxr-xr-x 2 root wheel 2B Jun 9 09:17 versions
So config file is not even being created at this stage… I suspect it has something to do with Yarn installation… I was able to run this command manually: “yarn install --no-emoji --no-progress” and it works fine… But then when I try the ghost installation again it fails saying that installation directory is not empty…
I had this issue during a ghost update and solved it by looking at the logs - it seems that it was getting stuck at ~/.config/yarn (read the logs for the specific folder, for the OP it is /usr/local/share/.config/yarn for example) so I removed that whole folder (make sure to make a backup of it first), presumably it wanted to read/write the files there but there was already a preexisting directory substructure that it didn’t understand so it got stuck rather than update.
Once I removed that directory the ghost update command was able to successfully complete. And subsequently, ghost start was able to start the blog.