Skip to content

Commit

Permalink
fix: npx fails to run (#382)
Browse files Browse the repository at this point in the history
npx will fail to execute any package unless .hermit/node/lib exists.
Create this folder on install or activation.

Co-authored-by: Nicholas Jackson <[email protected]>
  • Loading branch information
nickajacks1 and Nicholas Jackson authored Sep 12, 2023
1 parent b48e0a2 commit 85b135b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions node.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ test = "node --version"
binaries = ["bin/*"]
repository = "https://github.com/nodejs/node"
strip = 1
vars = {
"node_libdir": "${HERMIT_ENV}/.hermit/node/lib"
}
env = {
"COREPACK_HOME": "${HERMIT_ENV}/.hermit/node",
"NPM_CONFIG_PREFIX": "${HERMIT_ENV}/.hermit/node",
Expand All @@ -11,6 +14,15 @@ env = {
}
sha256-source = "https://nodejs.org/dist/v${version}/SHASUMS256.txt.asc"


on activate {
mkdir { dir = "${node_libdir}" }
}

on install {
mkdir { dir = "${node_libdir}" }
}

platform "amd64" {
source = "https://nodejs.org/dist/v${version}/node-v${version}-${os}-x64.tar.gz"
}
Expand Down

0 comments on commit 85b135b

Please sign in to comment.