Skip to content

Hydra admin frontend fails to install/ start on macOS x64 #243

Description

@JeffersonBledsoe

Prefacing this with the warning that this might be an upstream volto issue, as it is a problem that is coming from the startup of the volto instance in core.

I've tried the reproduction steps with node20 (unsupported by Volto 19 but is the pinned version for volto-hydra), node22 and node 24. I have tried pnpm 9, 10 (pinned by hydra) and 11 (latest). This may be some weird local issue, but it's occuring on any instance I try to start.

Steps to reproduce

  1. git clone git@github.com:collective/volto-hydra
  2. cd volto-hydra && make install
  3. make start

### Optional step after failed make start

pnpm build:deps

Additional info

Running make start produces the following error:

 ERROR  Invalid razzle.config.js file.

Error: Cannot find module 'REDACTED/volto-hydra/core/packages/volto/node_modules/@plone/registry/dist/addon-registry/create-addons-loader.cjs'
    at createEsmNotFoundErr (node:internal/modules/cjs/loader:1249:15)
    at finalizeEsmResolution (node:internal/modules/cjs/loader:1237:15)
    at resolveExports (node:internal/modules/cjs/loader:636:14)
    at Module._findPath (node:internal/modules/cjs/loader:716:31)
    at Module._resolveFilename (node:internal/modules/cjs/loader:1198:27)
    at Module._load (node:internal/modules/cjs/loader:1043:27)
    at Module.require (node:internal/modules/cjs/loader:1298:19)
    at require (node:internal/modules/helpers:182:18)
    at Object.<anonymous> (REDACTED/volto-hydra/core/packages/volto/razzle.config.js:11:32)
    at Module._compile (node:internal/modules/cjs/loader:1529:14) {
  code: 'MODULE_NOT_FOUND',
  path: 'REDACTED/volto-hydra/core/packages/volto/node_modules/@plone/registry/package.json'
}
 ELIFECYCLE  Command failed with exit code 1.
make: *** [Makefile:41: start] Error 1

This is due to the volto core not having the modules built. So after running the optional next steps to see if we can get around this issue, the following error is produced:

❯ pnpm build:deps

> volto-hydra-dev@1.0.0-alpha.0 build:deps REDACTED/volto-hydra
> pnpm --filter @plone/registry --filter @plone/components build

core/packages/volto                      |  WARN  Unsupported engine: wanted: {"node":"^22 || ^24"} (current: {"node":"v20.19.0","pnpm":"10.34.1"})
Scope: 2 of 19 workspace projects
core/packages/registry build$ tsup
[30 lines collapsed]
│ DTS dist/addon-registry/create-addons-styles-loader.d.cts  300.00 B
│ DTS dist/addon-registry/addon-registry.d.cts               7.97 KB
│ DTS dist/addon-registry/create-theme-loader.d.cts          348.00 B
│ DTS dist/index.d.ts                                        5.73 KB
│ DTS dist/addon-registry/create-addons-loader-server.d.ts   386.00 B
│ DTS dist/addon-registry/create-addons-loader.d.ts          428.00 B
│ DTS dist/addon-registry/create-addons-locales-loader.d.ts  195.00 B
│ DTS dist/addon-registry/create-addons-styles-loader.d.ts   299.00 B
│ DTS dist/addon-registry/addon-registry.d.ts                7.97 KB
│ DTS dist/addon-registry/create-theme-loader.d.ts           348.00 B
└─ Done in 8.4s
core/packages/components build$ tsup && pnpm build:css
│ CLI Building entry: src/index.ts, src/quanta/index.ts, src/components/icons/index.ts
│ CLI Using tsconfig: tsconfig.json
│ CLI tsup v8.5.1
│ CLI Using tsup config: REDACTED/volto-hydra/core/packages/components/tsup.config.ts
│ CLI Target: es2022
│ CLI Cleaning output folder
│ CJS Build start
│ ESM Build start
│ CJS dist/quanta/index.cjs           115.98 KB
│ CJS dist/index.cjs                  100.22 KB
│ CJS dist/components/icons/index.cjs 115.58 KB
│ CJS ⚡️ Build success in 348ms
│ ESM dist/chunk-YWREOUAG.js         18.43 KB
│ ESM dist/chunk-V3F5PCGN.js         98.43 KB
│ ESM dist/index.js                  40.70 KB
│ ESM dist/quanta/index.js           62.33 KB
│ ESM dist/components/icons/index.js 3.34 KB
│ ESM ⚡️ Build success in 348ms
│ DTS Build start
│ DTS ⚡️ Build success in 17862ms
│ DTS dist/index.d.cts                  16.69 KB
│ DTS dist/quanta/index.d.cts           15.60 KB
│ DTS dist/components/icons/index.d.cts 11.59 KB
│ DTS dist/WidthWidget-CLt1jHRP.d.cts   2.90 KB
│ DTS dist/Icon-BWLBHKLm.d.cts          1.15 KB
│ DTS dist/index.d.ts                   16.69 KB
│ DTS dist/quanta/index.d.ts            15.60 KB
│ DTS dist/components/icons/index.d.ts  11.59 KB
│ DTS dist/WidthWidget-CLt1jHRP.d.ts    2.90 KB
│ DTS dist/Icon-BWLBHKLm.d.ts           1.15 KB
│ > @plone/components@4.1.0 build:css REDACTED/volto-hydra/core/packages/components
│ > pnpm build:basic && pnpm build:quanta
│ > @plone/components@4.1.0 build:basic REDACTED/volto-hydra/core/packages/components
│ > lightningcss --browserslist --bundle --sourcemap src/styles/basic/main.css -o basic.css && mv basic.css* dist/.
│ REDACTED/volto-hydra/core/packages/components/node_modules/.bin/../../../../../node_modules/.pnpm/lightningcss-cli@1.32.0/node_modules/lightning…
│  ELIFECYCLE  Command failed.
│  ELIFECYCLE  Command failed with exit code 1.
└─ Failed in 21s at REDACTED/volto-hydra/core/packages/components
REDACTED/volto-hydra/core/packages/components:
 ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  @plone/components@4.1.0 build: `tsup && pnpm build:css`
Exit status 1
 ELIFECYCLE  Command failed with exit code 1.

This occurs because the lightningcss that is installed is the stub "This file is required so that npm creates the lightningcss binary on Windows." file and doesn't seem to get substituted for the real binary. Manually running the postinstall.js script with node at /node_modules/.pnpm/lightningcss-cli@1.32.0/node_modules/lightningcss-cli/postinstall.js runs this substitution and then it builds correctly, solving the issue. The expectation is that all this happens at install time, however it doesn't seem to be running for some reason, causing a silent failure on the startup. The allowBuilds key within pnpm-workspace.yaml doesn't seem to have any effect on this running.

## Proposed solution

  • For now, add a manual step to make install which runs this to workaround the issue
    • Fixed by Bump nodeJS to supported range #242
    • This shouldn't require a manual step, it hasn't in the past, so something else needs fixing which is causing it to skip the postinstall running.

System info

  • platform: darwin | arch: x64 (node -e "console.log('platform:', process.platform, '| arch:', process.arch)")
  • uname -m outputs x86_64 to rule out arch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions