Installing Ghost LTS on Ubuntu 18.04


#1

In order to resurrect an old blog that I abandoned in 2015, I’m trying to install Ghost from the LTS branch of the GitHub repository. I used nvm to get what i believe to be supported values of node and npm. In particular:

$ node --version
v6.14.2

$npm --version
3.10.10

I then followed the installation instructions npm install --production which seemingly concluded successfully. However, when I tried to start Ghost I ran into the following error.

$ npm start --production

[snip]

ERROR: Javascript files have not been built.

[snip]

I have uploaded the complete message as a gist on GitHub: https://gist.github.com/hnarayanan/82ed298ccb19273db3cfb942dbd38d16

When I searched for this error, it seemed to be reported some times in 2015, but I did not get to a clear fix. Could someone please help me debug this?


#2

Not an expert, but from other discussions this might be a nvm issue:

If you installed node via nvm, we highly recommend that you uninstall nvm. There have been several people who have run into permission problems, because they've installed nvm in /root or /home, which is a local installation of node. Ghost requires a system wide installation.

It is not enough to symlink the local installation to /usr/bin/node.

Please uninstall nvm and any node versions installed with it:

rm -rf $NVM_DIR ~/.npm ~/.bower
unset NVM_DIR;
which node;
rm -rf {path_to_node_version}
Also look in your ~/.bash_profile or ~/.bashrc and remove any nvm lines.

From here: https://docs.ghost.org/docs/install#section-install-ghost-cli.


#3

It might well be indeed, thank you. But I struggled with other npm and node installation methods, and I couldn’t get them to hit the exact version of node that this version of Ghost seems to want, 6.9 < supported npm version < 7.


#4

It might also be the issue of Ubuntu 18.04 as the Ghost installation is officially supported (recommended) for Ubuntu 16.04.

You can also try to see if any of these tips help: https://docs.ghost.org/docs/troubleshooting.


#5

Thank you.

I solved the problem by following notes on an old issue on GitHub. The npm install was not triggering grunt init which happened to do a lot of the heavy lifting.

The final steps that worked include:

npm cache clean
npm install
grunt init
# something about installing npm-sqlite3 that I don't
# seem to see in my command history
npm start

#6

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