Comments (5)
@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
:
-
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"
-
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):
I will (temporarily) update Hyas for this. Hope this helps!
from hyas.
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.
Updated: #156
from hyas.
https://answers.netlify.com/t/deploy-hugo-website-always-fails-when-caching-is-used/42997
from hyas.
hugo-installer
now installs in node_modules/.bin/hugo
β this folder is cached by Netlify.
Some tests:
- Initial Netlify deploy (runs
npm i
) ofh-enk/hyas
takes 53s: https://app.netlify.com/sites/hyas/deploys/6126512d6745b9e20afaa832 - Repeat Netlify deploy (using cached
node_modules
folder) ofh-enk/hyas
takes 26s: https://app.netlify.com/sites/hyas/deploys/612651067266a00007c66091
from hyas.
Related Issues (20)
- Add remote image support HOT 1
- Add dismissible global alert
- Adding images in markdown breaksdown HOT 3
- Add image partial HOT 1
- Should KaTeX be removed from hyas? HOT 3
- Remove section definition in index.html HOT 1
- Better images support
- Update lint scripts HOT 2
- Restructure Hyas setup
- Update Google Lighthouse gist HOT 1
- Project Dependency hugo-installer Doesnβt Support Hugo Versions Above v0.101.0 HOT 2
- Unused configuration parameters HOT 2
- Add Prettier code formatter HOT 1
- Add --renderToDisk scripts HOT 3
- Embedded YouTube video iframe invisible in production build HOT 4
- Hugo executable files are gone after adding custom dependencies HOT 6
- Add command to check for deprecation of functions, methods, etc HOT 1
- building fails after update to lates packages HOT 2
- Hyas Build Failure with Hugo v0.123.4 on Darwin/ARM64 Architecture HOT 6
- It's generally polite to ask HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hyas.