google / docsy

A set of Hugo doc templates for launching open source content.
https://docsy.dev
Apache License 2.0
2.62k stars 904 forks source link

[CI] Docsy 0.8.0 NPM-package postinstall may fail to run #2116

Closed chalin closed 2 weeks ago

chalin commented 2 weeks ago

This was uncovered by @sftim through his work on

To reproduce the problem, run the following:

hugo new site --format yaml myproject
cd myproject
echo 'theme: docsy' >> hugo.yaml
echo 'themesDir: node_modules' >> hugo.yaml
npm init -y
npm install --save-dev google/docsy#semver:0.8.0 autoprefixer postcss-cli hugo-extended@0.120.4
npx hugo 

Hugo reports: "Error: failed to load modules: module "github.com/FortAwesome/Font-Awesome" not found in "/Users/chalin/tmp/myproject/node_modules/github.com/FortAwesome/Font-Awesome"; either add it as a Hugo Module or store it in "/Users/chalin/tmp/myproject/node_modules".: module does not exist"

The problem is that Docsy's postinstall NPM script isn't being run automatically, but it should.

sftim commented 2 weeks ago

Ah, thanks for identifying this.