Ghost: Cannot generate assets (cards, admin-auth, etc) on local windows install

Issue Summary

Installed ghost ( Node.js version - found v16.14.0 | npm: ‘8.3.1’ | Ghost-CLI version: 1.18.1 | Ghost version: 4.38.0 ) on my Windows 10 machine. cards.min.css don’t seem to load on my local dev site, but it does on the editor.

Editor: image

Published: image

I touched NOTHING. This is a fresh install, tried six times.

Here’s the Package.json file, cards should show up.

image

Additionally, when I try to go to http://localhost:2368/public/cards.min.css on my browser, I get a 404 error.

Lastly, someone reported the same issue in 2021: in this post, a guy reported the same issue I’m having. Sadly, he seems to have abandoned ghost because of it, because no more posts under his username were made and he didn’t bother to fill a bug report.

Steps to Reproduce

  1. Install ghost through npm locally on Windows
  2. Start Ghost
  3. Add cards on any blog post
  4. Publish

Ghost Version

4.38

Node.js Version

16.14.0

How did you install Ghost?

Windows 10 (npm)

Database type

SQLite3

Browser & OS version

Chrome, Firefox, Windows 10

Relevant log / error output

{"name":"Log","hostname":"DESKTOP","pid":3668,"level":30,"req":{"meta":{"requestId":"34727ba4-f918-4ee5-aaf7-696ed49b2390","userId":null},"url":"/public/cards.min.css","method":"GET","originalUrl":"/public/cards.min.css","params":{},"headers":{"host":"localhost:2368","user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0","accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8","accept-language":"en-US,en;q=0.5","accept-encoding":"gzip, deflate","connection":"keep-alive","cookie":"**REDACTED**","upgrade-insecure-requests":"1","sec-fetch-dest":"document","sec-fetch-mode":"navigate","sec-fetch-site":"none","sec-fetch-user":"?1"},"query":{}},"res":{"_headers":{"x-powered-by":"Express","cache-control":"no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0","content-type":"text/html; charset=utf-8","etag":"W/\"3207-66Cm6wMvq5dLdcDIxd1CmDjHrEc\"","vary":"Accept-Encoding","content-encoding":"gzip"},"statusCode":404,"responseTime":"40ms"},"msg":"","time":"2022-03-07T20:07:44.546Z","v":0}

Code of Conduct

  • I agree to be friendly and polite to people in this repository

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 2
  • Comments: 23 (12 by maintainers)

Commits related to this issue

Most upvoted comments

@vikaspotluri123 was on the right track. minifier uses tiny-glob which uses globalyzer, which isn’t compatible with Windows. I checked the output within Ghost and also ran the tests in the globalyzer package - both gave incorrect output, confusing forward and back-slashes.

It didn’t look like it was worth trying to fix globalyzer’s root issue since it’s meant to be an optimized package. I’d probably look to use something like node-glob which has Windows handling and much more robust testing libraries. Since this is just for the minifier, it seems fine to lose out on the performance gains for robustness.

If you like @ErisDS, I can make the swap within minifier. I don’t know where you all land on cross-platform support, given just about any deployment won’t be on Windows.