Giter Club home page Giter Club logo

Comments (5)

h-enk avatar h-enk commented on August 22, 2024

@sean-pwd, thanks for reporting this.

NPM scripts do not work on windows

I can't reproduce this (using both starter theme + child theme)

Site runs locally but is broken on netlify

I've noticed that too. Netlify doesn't work as expected, running Hugo from a bin directory. It's a Netlify caching thing. ("Clear cache and deploy site" will make it run OK).

However, that's not really workable. So, for now (I will raise an issue w/ Netlify), we better use Netlify for running Hugo β€” edit ./netlify.toml:

  1. Add a Hugo version (preferably the one you're using locally):

    [build.environment]
      NODE_VERSION = "16.3.0"
      NPM_VERSION = "7.16.0"
      HUGO_VERSION = "0.84.4"
  2. Replace all instances of exec-bin bin/hugo/hugo w/ hugo

That's it (no need to edit ./package.json)! Now the Netlify deployment process will run as expected β€” after clearing the Netlify cache (once only):

Snag_ea6dda

I will (temporarily) update Hyas for this. Hope this helps!

from hyas.

sean-au avatar sean-au commented on August 22, 2024

Thanks for having a look. I will clone hyas to a new repository after you have updated it so I cant test the new config.
I re-cloned the repository and it worked fine running from the bin folder. I'm not sure why it failed the first time

from hyas.

h-enk avatar h-enk commented on August 22, 2024

Updated: #156

from hyas.

h-enk avatar h-enk commented on August 22, 2024

https://answers.netlify.com/t/deploy-hugo-website-always-fails-when-caching-is-used/42997

from hyas.

h-enk avatar h-enk commented on August 22, 2024

84240b5

hugo-installer now installs in node_modules/.bin/hugo β€” this folder is cached by Netlify.

Some tests:

from hyas.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.