• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved Trying to Install Ghost CMS as a Node.js app isn't working

I want to install Ghost CMS for a domain hosted on my plesk server.

Plesk Version: Plesk Obsidian 18.0.40
Plesk Server OS version: Ubuntu 20.04.03 LTS
Node.js version 14.18.2 is configured for the subdomain I want to use
URL: https://ghost.orangekarat.com
Ghost version: 4.32.0
The subdomain is secured by plesk using Let’s Encrypt

Steps I’ve followed (based on this link):
  • I’ve uploaded the ghost zip file for 4.32.0 to the subdomain root directory and extracted all of the files into that directory.
  • I’ve added a file named .npmrc with the line “scripts-prepend-node-path=true” This is also saved in the subdomain root directory.
  • I’ve modified the file /core/shared/config/defaults.json file to point to the domain “https://ghost.orangekarat.com 2
  • I’ve updated the file /core/shared/config/env/config.production.json with the database type (mariadb), database name: “ghost”, and correct login credentials.
I then enabled Node.js 14.18.2 for https://ghost.orangekarat.com 2. I specify the document root and application root directories as seen below:

1640017776395.png

I then click the “NPM Install” button. After a period of waiting on dependencies and such, a message finally appears filled with warnings and a few fatal errors.

And now I am here to ask what, if anything, I can do to successfully complete the install? FYI, I’m running ghost just fine on plesk using a docker container, but I’d prefer this method as it preserves the file permissions for the user who owns this subdomain.

Here is the complete list of warnings and errors I received:

Code:
npm WARN deprecated [email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm WARN deprecated [email protected]: [email protected] drops support for the browser, Node <12.11.0, and removes bthreads entirely. Either upgrade to v7.0.0 or lock your bree version to v6.5.0.
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: request-promise has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: We've written a new parser that's 6x faster and is backwards compatible. Please use @formatjs/icu-messageformat-parser
npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
npm WARN deprecated [email protected]: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated [email protected]: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack at getNotFoundError (/opt/plesk/node/14/lib/node_modules/npm/node_modules/which/which.js:13:12)
gyp ERR! stack at F (/opt/plesk/node/14/lib/node_modules/npm/node_modules/which/which.js:68:19)
gyp ERR! stack at E (/opt/plesk/node/14/lib/node_modules/npm/node_modules/which/which.js:80:29)
gyp ERR! stack at /opt/plesk/node/14/lib/node_modules/npm/node_modules/which/which.js:89:16
gyp ERR! stack at /opt/plesk/node/14/lib/node_modules/npm/node_modules/isexe/index.js:42:5
gyp ERR! stack at /opt/plesk/node/14/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
gyp ERR! stack at FSReqCallback.oncomplete (fs.js:191:21)
gyp ERR! System Linux 5.4.0-91-generic
gyp ERR! command "/opt/plesk/node/14/bin/node" "/opt/plesk/node/14/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /var/www/vhosts/orangekarat.com/ghost.orangekarat.com/node_modules/dtrace-provider
gyp ERR! node -v v14.18.2
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp WARN Using request for node-pre-gyp https download
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.2 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

Any guidance/help would be greatly appreciated!
 
Looks like make package is not installed on your server. Try to install it with

# apt install make

Thanks for that. I installed make, reset the configuration, and tried it again.

This time I received the following warnings (in a Ghost CMS forum, they suggest that these warnings can be ignored):

Code:
npm WARN deprecated [email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm WARN deprecated [email protected]: [email protected] drops support for the browser, Node <12.11.0, and removes bthreads entirely. Either upgrade to v7.0.0 or lock your bree version to v6.5.0.
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: request-promise has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: We've written a new parser that's 6x faster and is backwards compatible. Please use @formatjs/icu-messageformat-parser
npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
npm WARN deprecated [email protected]: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated [email protected]: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
node-pre-gyp WARN Using request for node-pre-gyp https download
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.2 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

So, it seems that everything else installed. However, Ghost CMS still isn't running. If I navigate to the applications domain, https://ghost.orangekarat.com, I get the message:

Incomplete response received from application

Now I'm really at a loss.
 
Got it. Upon investigation, I learned a few things:

First, the "client" for MariaDB sql databases is actually "mysql." You use the same client for both configs.
Second, This still failed, but then I discovered that you cannot specify the database server with the port appended. You have to create a separate cofiguration entry "port" for the port number.

It works! Thanks for the pointers. And thanks to the Node.js devs for their documentation.
 
Back
Top