You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just spent a couple hours tearing out my hair over this and narrowed the problem down to the new release of pkg:
FROM node:16-alpine AS node-build
WORKDIR /build
ENV PKG_CACHE_PATH /build/.pkg-cache
RUN mkdir -p ${PKG_CACHE_PATH}
RUN echo ${PKG_CACHE_PATH}
RUN npm i -g pkg ipfs-car
RUN pkg --debug --targets=node16-linuxstatic-x64 `which ipfs-car`
yields
> [debug] Targets:
[
{
"nodeRange": "node16",
"platform": "linuxstatic",
"arch": "x64",
"output": "/build/ipfs-car",
"forceBuild": false,
"fabricator": {
"nodeRange": "node16",
"platform": "alpine",
"arch": "x64",
"binaryPath": "/build/.pkg-cache/v3.2/fetched-v16.12.0-alpine-x64"
},
"binaryPath": "/build/.pkg-cache/v3.2/fetched-v16.12.0-linuxstatic-x64"
}
]
�[91mnode:assert:400
throw err;
^
AssertionError [ERR_ASSERTION]: Placeholder for not found
at injectPlaceholder (/usr/local/lib/node_modules/pkg/lib-es5/producer.js:29:25)
at injectPlaceholders (/usr/local/lib/node_modules/pkg/lib-es5/producer.js:56:5)
at /usr/local/lib/node_modules/pkg/lib-es5/producer.js:319:17
at /usr/local/lib/node_modules/pkg/node_modules/graceful-fs/graceful-fs.js:343:16
at FSReqCallback.oncomplete (node:fs:188:23) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: false,
expected: true,
operator: '=='
}
Pinning pkg to 5.4.0 resolves the issue.
My guess is that this is related to this change in pkg-fetch 3.2.1: vercel/pkg-fetch#199
Just spent a couple hours tearing out my hair over this and narrowed the problem down to the new release of pkg:
yields
Pinning pkg to 5.4.0 resolves the issue.
My guess is that this is related to this change in pkg-fetch 3.2.1: vercel/pkg-fetch#199