Ghost installation

Hi,
I’m trying to install Ghost latest version according to https://docs.ghost.org/install/ubuntu/
I have:
Ubuntu 18.04.1 LTS
nginx/1.14.0 (Ubuntu)
Node.js v8.12.0
mysql Ver 14.14 Distrib 5.7.24

I created myuser, added him to sudo group and switched to myuser
Installed node.js, nginx, mysql then did:

$ sudo npm install ghost-cli@latest -g
npm WARN deprecated cross-spawn-async@2.2.5: cross-spawn no longer requires a build toolchain, use it instead
/usr/bin/ghost -> /usr/lib/node_modules/ghost-cli/bin/ghost

  • ghost-cli@1.9.7
    updated 1 package in 13.7s

$ npm root -g
/usr/lib/node_modules

$ ghost
Command β€˜ghost’ not found, did you mean:
…

$ sudo ls -ld /usr/lib/node_modules/ghost-cli/
drwxr-xβ€” 6 root root 4096 Nov 1 14:56 /usr/lib/node_modules/ghost-cli/

If I do:

$ sudo chown myuser: /usr/lib/node_modules/ghost-cli

I get:

$ ghost
module.js:550
throw err;
^

Error: Cannot find module β€˜yargs’

When I check npm modules:

$ npm ls -g
/usr/lib
β”œβ”€β”¬ ghost-cli@1.9.7
β”‚ β”œβ”€β”€ UNMET DEPENDENCY abbrev@1.1.1
β”‚ β”œβ”€β”€ UNMET DEPENDENCY adm-zip@0.4.11
β”‚ β”œβ”€β”€ UNMET DEPENDENCY bluebird@3.5.1
β”‚ β”œβ”€β”€ UNMET DEPENDENCY chalk@2.4.1
β”‚ β”œβ”€β”€ UNMET DEPENDENCY cli-table3@0.5.0
β”‚ β”œβ”€β”€ UNMET DEPENDENCY debug@3.1.0
β”‚ β”œβ”€β”€ UNMET DEPENDENCY decompress@4.2.0
β”‚ β”œβ”€β”€ UNMET DEPENDENCY download@7.1.0
β”‚ β”œβ”€β”€ UNMET DEPENDENCY execa@0.10.0
β”‚ β”œβ”€β”€ UNMET DEPENDENCY find-plugins@1.1.7
β”‚ β”œβ”€β”€ UNMET DEPENDENCY fkill@5.3.0
β”‚ β”œβ”€β”€ UNMET DEPENDENCY fs-extra@7.0.0
β”‚ β”œβ”€β”€ UNMET DEPENDENCY generate-password@1.4.0
β”‚ β”œβ”€β”€ UNMET DEPENDENCY global-modules@1.0.0
β”‚ β”œβ”€β”€ UNMET DEPENDENCY got@8.3.2
β”‚ β”œβ”€β”€ UNMET DEPENDENCY inquirer@6.1.0
…

npm ERR! missing: semver@5.5.0, required by ghost-cli@1.9.7
npm ERR! missing: shasum@1.0.2, required by ghost-cli@1.9.7
npm ERR! missing: stat-mode@0.2.2, required by ghost-cli@1.9.7
npm ERR! missing: strip-ansi@4.0.0, required by ghost-cli@1.9.7
npm ERR! missing: symlink-or-copy@1.2.0, required by ghost-cli@1.9.7
npm ERR! missing: systeminformation@3.42.9, required by ghost-cli@1.9.7
npm ERR! missing: tail@1.3.0, required by ghost-cli@1.9.7
npm ERR! missing: validator@7.2.0, required by ghost-cli@1.9.7
npm ERR! missing: yargs@12.0.1, required by ghost-cli@1.9.7
npm ERR! missing: yarn@1.9.4, required by ghost-cli@1.9.7

Can you help me out with the installation? Can you share what ownership and permissions should be set on npm modules?

With no solution I decided to rebuild my VPS and install everything from clean start. It’s ok now.

2 Likes

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