cashapp / cashapp/hermit

Support for npm packages or better documentation

Open
#522 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
926
Forks
111
Avg merge
7m
Merged PRs (30d)
1

Description

I am trying declaratively install an npm package and created

```
description = "OpenSpec CLI (installed via npm during Hermit install)"

binaries = ["OpenSpec-${version}/bin/openspec.js"]

# Basic test to validate the package after installation
test = "bin/openspec --help"

source = "https://github.com/Fission-AI/OpenSpec/archive/refs/tags/v${version}.zip"

repository = "https://github.com/Fission-AI/OpenSpec"

version "0.16.0" {
runtime-dependencies = ["node-24.12.0"]
on install {
run {
cmd = "${HERMIT_BIN}/npm install --prefix ${root} @fission-ai/openspec@${version} --no-fund"
}
}
}
```

I tried different prefix and none of the approaches seem to work:

1. if `--prefix ${root}` - `EACCES: permission denied, mkdir '/Users/iilyak/Library/Caches/hermit/pkg/openspec-0.16.0/node_modules'`
2. if `--prefix ${HERMIT_ENV}/.hermit/node` - the installation succeed but execution fails `Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/iilyak/Library/Caches/hermit/pkg/openspec-0.16.0/OpenSpec-0.16.0/dist/cli/index.js'`
3. if `--prefix ${HERMIT_ENV}` - the installation succeed but execution fails `Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/iilyak/Library/Caches/hermit/pkg/openspec-0.16.0/OpenSpec-0.16.0/dist/cli/index.js'`
4. if I remove `--prefix` - `EACCES: permission denied, mkdir '/Users/iilyak/Library/Caches/hermit/pkg/openspec-0.16.0/node_modules'`

```
ls -la /Users/iilyak/Library/Caches/hermit/pkg/
total 0
drwxr-xr-x 7 iilyak staff 224 Dec 11 12:45 ./
drwxr-xr-x 8 iilyak staff 256 Dec 9 12:36 ../
drwxr-xr-x 3 iilyak staff 96 Dec 9 12:31 hermit@stable/
dr-x------ 9 iilyak staff 288 Dec 11 12:13 node-24.12.0/
dr-x------ 3 iilyak staff 96 Dec 11 12:45 openspec-0.16.0/
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the four npm installation variants using the package definition and commands shown in the issue, recording the permission and module-resolution failures. Determine whether Hermit should support this npm package pattern or document a working configuration; done means a supported installation path or clear documentation for installing and running OpenSpec.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, node.js
Domain
cli, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.