Skip to content

Commit 87b7d96

Browse files
authored
🐛 fix: fix pnpm cannot be installed via corepack due to key id mismatch
1 parent 51b19a7 commit 87b7d96

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ RUN \
3636
npm config set registry "https://registry.npmmirror.com/"; \
3737
fi \
3838
&& export COREPACK_NPM_REGISTRY=$(npm config get registry | sed 's/\/$//') \
39+
&& npm i -g corepack@latest \
3940
&& corepack enable \
40-
&& corepack use pnpm \
41+
&& corepack use $(sed -n 's/.*"packageManager": "\(.*\)".*/\1/p' package.json) \
4142
&& pnpm i \
4243
&& npm run build
4344

0 commit comments

Comments
 (0)