-
-
Notifications
You must be signed in to change notification settings - Fork 174
Open
Description
Problem
When pnpm-lock.yaml is generated on macOS, pnpm install --frozen-lockfile on a Linux x64 Docker build host does not install @node-llama-cpp/linux-x64.
Observed
node-llama-cpp@3.15.1installed via pnpm@node-llama-cpp/linux-x64present in lockfile (12 occurrences)pnpm.onlyBuiltDependenciesincludesnode-llama-cpp- Yet
@node-llama-cpp/linux-x64absent fromnode_modules/afterpnpm install --frozen-lockfileon Linux x64
Workaround
Manually fetch the tarball in Dockerfile after pnpm install:
ARG NODE_LLAMA_VER=3.15.1
RUN wget -q "https://registry.npmjs.org/@node-llama-cpp/linux-x64/-/linux-x64-${NODE_LLAMA_VER}.tgz" \
-O /tmp/nlcpp.tgz \
&& mkdir -p /app/node_modules/@node-llama-cpp \
&& tar -xzf /tmp/nlcpp.tgz -C /tmp/nlcpp-extract \
&& mv /tmp/nlcpp-extract/package /app/node_modules/@node-llama-cpp/linux-x64
Questions
- Is this a known pnpm cross-platform lockfile limitation?
- Should postinstall ensure the correct platform binary regardless of lockfile origin?
- Recommended Docker build pattern for macOS lockfiles targeting Linux x64?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels