How to solve node problem

How to solve the issue ?

Warning: Ghost is running with node v16.20.2.
Your current node version is v18.17.0.
βœ– Checking systemd node version - found v16.20.2
One or more errors occurred.

1) SystemError

Message: Ghost v5.72.1 is not compatible with Node v16.20.2
Help: Check the version of Node configured in /lib/systemd/system/ghost_dumup-com.service and update it to a compatible version

Debug Information:
    OS: Ubuntu, v22.04.3 LTS
    Node Version: v18.17.0
    Ghost Version: 5.72.1
    Ghost-CLI Version: 1.25.3
    Environment: production
    Command: 'ghost start'

Try running ghost doctor to check your system for known issues.

You can always refer to https://ghost.org/docs/ghost-cli/ for troubleshooting.
root2@linux:/var/www/dumup_com$ ^C

Ghost now requires Node v18. You have Node 16 installed.

This FAQ also includes an upgrade guide :slight_smile:

I install v18

root2@linux:/var/www/dumup_com$ node --version
v18.17.0
root2@linux:/var/www/dumup_com$

This is what it says in your logs – so if you upgraded node in between, just try installing it again?

Warning: Ghost is running with node v16.20.2.

How did you install Node?

root2@linux:/var/www/dumup_com$ ghost start 

Love open source? We’re hiring JavaScript Engineers to work on Ghost full-time.
https://careers.ghost.org


+ sudo systemctl is-active ghost_dumup-com
βœ– Checking system Node.js version - found v18.17.0
βœ” Ensuring user is not logged in as ghost user
βœ” Checking if logged in user is directory owner
βœ” Checking current folder permissions
+ sudo systemctl is-active ghost_dumup-com
βœ” Validating config
βœ” Checking folder permissions
βœ” Checking file permissions
βœ” Checking content folder ownership
βœ” Checking memory availability
βœ” Checking binary dependencies
βœ” Checking systemd unit file
Warning: Ghost is running with node v16.20.2.
Your current node version is v18.17.0.
βœ– Checking systemd node version - found v16.20.2
One or more errors occurred.

1) SystemError

Message: The directory /home/root2/ is not readable by other users on the system.
This can cause issues with the CLI, you must either make this directory readable by others or install node and Ghost-CLI in another location.


2) SystemError

Message: Ghost v5.72.1 is not compatible with Node v16.20.2
Help: Check the version of Node configured in /lib/systemd/system/ghost_dumup-com.service and update it to a compatible version

Debug Information:
    OS: Ubuntu, v22.04.3 LTS
    Node Version: v18.17.0
    Ghost Version: 5.72.1
    Ghost-CLI Version: 1.25.3
    Environment: production
    Command: 'ghost start'

Try running ghost doctor to check your system for known issues.

You can always refer to https://ghost.org/docs/ghost-cli/ for troubleshooting.
root2@linux:/var/www/dumup_com$

Instead of just posting logs, would be great to get some context from you :smiley:

I am pretty confused be what’s going on here. It says Node Version: v18.17.0, but also Warning: Ghost is running with node v16.20.2.. So, without any context, I have to assume that you have (somehow?) installed two node versions?


How to find the path of node version and use 18
I used which node


everything seems correct but the only things is take too long to start
The error message is clear: Ghost v5.72.1 is not compatible with Node.js v16.20.2. To resolve this issue, you need to update the Node.js version in the systemd service configuration for your Ghost instance. Here’s how you can do that:

  1. Open the systemd service configuration file:

    sudo nano /lib/systemd/system/ghost_dumup-com.service
    

    Replace nano with your preferred text editor (e.g., vim, nano, or gedit).

  2. Find the line that specifies the Node.js version:

    Look for a line that starts with ExecStart and contains a reference to the Node.js binary, like this:

    ExecStart=/usr/bin/node /usr/bin/ghost run
    
  3. Update the Node.js version in the configuration:

    Modify the line to use the compatible Node.js version you installed earlier with NVM. For example:

    ExecStart=/path/to/your/compatible/node/version /usr/bin/ghost run
    

    Make sure to replace /path/to/your/compatible/node/version with the actual path to the compatible Node.js version you installed using NVM.

  4. Save the changes and exit the text editor:

    • In nano, you can press Ctrl + O to save the file, then press Enter, and Ctrl + X to exit.
  5. Reload systemd to apply the changes:

    sudo systemctl daemon-reload
    
  6. Restart your Ghost service:

    sudo systemctl restart ghost_dumup-com
    

After completing these steps, your Ghost service should now be running with the compatible Node.js version, and the error should be resolved. You can verify that the service is running with the correct Node.js version by using:

sudo systemctl is-active ghost_dumup-com

This should confirm that the service is running without issues.

2 Likes

Alright, first things first: Never blindly trust what ChatGPT says. It’s completely outdated and a language model – it literally just predicts what the next word could potentially be. Its information can very well be wrong.

Since you’ve mentioned that everything works now, I take it that this is solved. The fact that it takes long can be normal, when you upgrade to a new version, since dependencies need to be installed.

2 Likes

How do I solve the start loading time,take hours or minutes

I don’t know. You haven’t really given us any information here. It can be anything from the hardware of your server to wrong configurations.

I am turning off notifications here now, since I cannot help you, without receiving context first, sorry.

1 Like

Context ? Which one! I’m trying to update to the latest version and the pictures show the full details . I use the chatGPT solution but seems not working ?

[Unit]
Description=Ghost systemd service for blog: dumup-com
Documentation=https://ghost.org/docs/

[Service]
Type=simple
WorkingDirectory=/var/www/dumup_com
User=999
Environment="NODE_ENV=production"
ExecStart=/home/root2/.nvm/versions/node/v18.17.0/bin/node /usr/bin/ghost run
Restart=always

[Install]
WantedBy=multi-user.target

CORRECT OR NOT

 which node 
/home/root2/.nvm/versions/node/v18.17.0/bin/node

It is obvious that you have two node versions installed.
I would suggest to delete both versions and start from scratch.

are you installing this on ubuntu ?


everything seems correct but stuck

can anyone know the problem

any one know How to solve the issues, I’m using ubuntu VPS selfhosted everthing seems correct but the message

Message: Could not communicate with Ghost
Suggestion: journalctl -u ghost_dumup-com -n 50

Debug Information:
    OS: Ubuntu, v22.04.3 LTS
    Node Version: v18.17.0
    Ghost Version: 5.72.2
    Ghost-CLI Version: 1.25.3
    Environment: production
    Command: 'ghost start'

Additional log info available in: /home/root2/.ghost/logs/ghost-cli-debug-2023-11-10T09_30_31_096Z.log

Try running ghost doctor to check your system for known issues.

You can always refer to https://ghost.org/docs/ghost-cli/ for troubleshooting.
root2@linux:/var/www/dumup_com$ journalctl -u ghost_dumup-com -n 50
Hint: You are currently not seeing messages from other users and the system.
      Users in groups 'adm', 'systemd-journal' can see all messages.
      Pass -q to turn off this notice.
-- No entries --

I’m trying to use the right node.js path for my ghost installation but nothing seems to work. I installed v18.12.1 but nothing appears
check the error message and NVM list in VPS Ubuntu

root2@linux:/var/www/dumup_com$ ghost doctor 

Love open source? We’re hiring JavaScript Engineers to work on Ghost full-time.
https://careers.ghost.org


βœ” Checking system Node.js version - found v18.12.1
βœ” Checking logged in user
βœ” Ensuring user is not logged in as ghost user
βœ” Checking if logged in user is directory owner
βœ” Checking current folder permissions
βœ” Checking system compatibility
βœ” Checking for a MySQL installation
+ sudo systemctl is-active ghost_dumup-com
βœ” Validating config
βœ” Checking folder permissions
βœ” Checking file permissions
βœ” Checking content folder ownership
βœ” Checking memory availability
βœ” Checking binary dependencies
βœ” Checking free space
βœ” Checking systemd unit file
Warning: Ghost is running with node v16.20.2.
Your current node version is v18.12.1.
βœ– Checking systemd node version - found v16.20.2
One or more errors occurred.

1) SystemError

Message: Ghost v5.72.2 is not compatible with Node v16.20.2
Help: Check the version of Node configured in /lib/systemd/system/ghost_dumup-com.service and update it to a compatible version

Debug Information:
    OS: Ubuntu, v22.04.3 LTS
    Node Version: v18.12.1
    Ghost Version: 5.72.2
    Ghost-CLI Version: 1.25.3
    Environment: production
    Command: 'ghost doctor'

Try running ghost doctor to check your system for known issues.

You can always refer to https://ghost.org/docs/ghost-cli/ for troubleshooting.
root2@linux:/var/www/dumup_com$ 

My nvm list

I want to run ghost version in the right path, right node version for example

nvm -version
show v18.12.1 but npm show

root2@linux:/var/www/dumup_com$ npm -version
8.19.2
root2@linux:/var/www/dumup_com$ 
type or paste code here

I tried many solution including using
ExecStart=/home/yourusername/.nvm/versions/node/v14.x.x/bin/node /usr/bin/ghost run
nothing change

Since journalctl -u ghost_dumup-com -n 50 yields no results, I’d suggest you have a permissions issue or there is a problem with Node. Note the location of additional log information, and output from ghost doctor. More information is needed to diagnose.

Edit: I see you’re posting in another thread about Node. Is this matter resolved or superseded?

You can read all the post

root2@linux:/var/www/dumup_com$ ghost doctor 

Love open source? We’re hiring JavaScript Engineers to work on Ghost full-time.
https://careers.ghost.org


βœ” Checking system Node.js version - found v18.12.1
βœ” Checking logged in user
βœ” Ensuring user is not logged in as ghost user
βœ” Checking if logged in user is directory owner
βœ” Checking current folder permissions
βœ” Checking system compatibility
βœ” Checking for a MySQL installation
+ sudo systemctl is-active ghost_dumup-com
βœ” Validating config
βœ” Checking folder permissions
βœ” Checking file permissions
βœ” Checking content folder ownership
βœ” Checking memory availability
βœ” Checking binary dependencies
βœ” Checking free space
βœ” Checking systemd unit file
βœ” Checking systemd node version - found v18.12.1

I fixed all the issues seems ghost won’t start