Skip to content

Commit e655de1

Browse files
committed
refactor: now uses corepack to install pnpm
1 parent eff36a2 commit e655de1

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

node-dev.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ touch /etc/profile.d/pnpmPath.sh && \
4242
source /etc/profile.d/pnpmPath.sh
4343

4444
# Install pnpm and ni
45-
npx pnpm i -g pnpm@latest
45+
npm install --global corepack@latest
46+
corepack enable
47+
corepack prepare pnpm --activate
4648
pnpm i -g @antfu/ni && \
4749
touch ~/.nirc && \
4850
echo 'defaultAgent=pnpm' >> ~/.nirc && \

node.Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ RUN touch /etc/profile.d/pnpmPath.sh && \
2525
source /etc/profile.d/pnpmPath.sh
2626
# This will make the command re-run if theres a new pnpm version (prevents docker cache installing an older version)
2727
ADD "https://api.github.com/repos/pnpm/pnpm/tags?per_page=1" latest_commit
28-
RUN npx pnpm i -g pnpm@latest
28+
RUN npm install --global corepack@latest
29+
RUN corepack enable
30+
RUN corepack prepare pnpm --activate
2931
RUN pnpm i -g @antfu/ni && \
3032
touch ~/.nirc && \
3133
echo 'defaultAgent=pnpm' >> ~/.nirc && \

0 commit comments

Comments
 (0)