Ghost blog can't upload images. Possible Sharp module issue?

Hello there!

Very new to glitch and a little stuck.

I’m trying to set up a Ghost blog by remixing https://glitch.com/~ghost at https://glitch.com/~paceandfizzle.

The blogging features seem to work fine however trying to change or upload any images fails to work. The Ghost settings gives “Ghost is down for maintenance etc…”

Going back to glitch the log debugger shows many warnings like

[2019-08-22 02:50:09] WARN Cookie members-ssr not found

And specifically when trying to add images shows

Something went wrong installing the "sharp" module

Cannot find module '../build/Release/sharp.node'

- Remove the "node_modules/sharp" directory, run "npm install" and look for errors

- Consult the installation documentation at https://sharp.pixelplumbing.com/en/stable/install/

- Search for this error at https://github.com/lovell/sharp/issues

This is something you should probably try to ask in Ghost Project website/github, not here. Glitch cannot offer assistance on third party modules.

hi @paceandfizzle - i’m sorry you had this issue, it appears to be happening on all remixes of ~ghost, probably because of a version update!! i’m working on finding out how to fix or if there’s another app running ghost that works and will post here when i do!

2 Likes

Also experiencing this. Been trying to fix it for a while now. I’ve installed and tried to reinstall Sharp a number of times

1 Like

hey i’m back @paceandfizzle, @robocopkaka - so i got a remix of ~ghost working by doing a few things: updating the ghost package in package.json, changing the node version in the same file to 10.x since ghost only supports 8 and 10 LTE versions, and then i ran enable-npm in the console because i believe the version of pnpm we are using is not compatible with properly building the sharp package.

getting pnpm updated is something the platform team is working on and can take some time. in the meantime, if you remix https://glitch.com/edit/#!/evergreen-sassafras - it should have working image uploads. let me know if it does/doesn’t work out for y’all! if so, i’m going to make that the canonical ghost app for folks to remix off of.

thanks for your patience btw!!

3 Likes

I remixed the second project and I don’t have image upload errors. Thanks a lot.

3 Likes

awesome, so glad to hear!! it may take me some time but i’m going to make sure that app i made that works gets renamed to ~ghost so that no one else runs into this problem!!

1 Like

I am running into the same issue with the Ghost 3.0 blog. It is not possible to upload images.

Something went wrong installing the "sharp" module

Cannot find module '../build/Release/sharp.node'

- Remove the "node_modules/sharp" directory, run "npm install" and look for errors
- Consult the installation documentation at https://sharp.pixelplumbing.com/en/stable/install/
- Search for this error at https://github.com/lovell/sharp/issues

Also, the remix referred to above by @jenn shows a notice that the project evergreen-sassafras has been suspended.

Hi Bauhouse. I think that project was renamed. It’s https://glitch.com/~ghost now.

For the Sharp issue I’ve also had some success with running enable-npm and then enable-pnpm.

Running enable-npm and then enable-pnpm does appear to work.

However, if I try updating to the latest version of ghost by updating the npm packages in the package.json file, then Glitch goes into an infinite loop with this error:

Error: ENOENT: no such file or directory, open '/app/data/ghost.ghost.2020-04-07-19-13-53.json'

and

ERROR Target log folder does not exist: /app/logs/

Hmm that is strange, the directory exists right? If it does maybe it’s a permissions issue.

After running these commands

enable-npm
enable-pnpm

It seems all I needed to do was to remove the node_modules/sharp directory and install the sharp module as a dependency.

npm install sharp

Then I created the missing directories in the home (/app) directory:

cd ~
mkdir data
mkdir logs

Then update each package one by one to test which one might fail.

  • "knex-migrator": "^3.4.2"
  • "ghost-cli": "^1.13.1"
  • "ghost": "^3.13.1"

Each package updated without errors this time. Ghost is now updated to version 3.13.1.

Thanks for your help, @mmcewen!

1 Like

Great to hear! Hopefully this will also help others so I appreciate you posting your solution.

If anyone wants to remix the updated Ghost 3.13.1 project, it’s here: https://glitch.com/~ghost-v3

1 Like