Skip to content

Commit

Permalink
Pin broken builds to npm version 7
Browse files Browse the repository at this point in the history
Using npm version 7 seems to avoid a bug where the build for the
`@appsignal/nodejs` package is not ran before `npm install`,
causing the installation to fail as it depends on the Transmitter,
which needs to be transpiled first.

The bug seems similar to [npm/cli#4552][bug], although that seems
to be fixed in npm 8.10.0, and upgrading to that version did not
fix the problem. I have been unable to reproduce the bug outside
of Semaphore CI, which further complicates investigating it.
  • Loading branch information
unflxw committed May 30, 2022
1 parent a0cf809 commit 1c9a98b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion nodejs/express-apollo/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUN apt-get update && apt-get install -y ruby
# Update npm
ENV NPM_CONFIG_PREFIX=/home/node/.npm-global
ENV PATH=/home/node/.npm-global/bin:$PATH
RUN mkdir -p $NPM_CONFIG_PREFIX/lib && npm install -g npm
RUN mkdir -p $NPM_CONFIG_PREFIX/lib && npm install -g npm@8.5.3

# Configure mono
ENV PATH=/root/mono/bin:$PATH
Expand Down
2 changes: 1 addition & 1 deletion nodejs/koa/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUN apt-get update && apt-get install -y postgresql-client ruby
# Update npm
ENV NPM_CONFIG_PREFIX=/home/node/.npm-global
ENV PATH=/home/node/.npm-global/bin:$PATH
RUN mkdir -p $NPM_CONFIG_PREFIX/lib && npm install -g npm
RUN mkdir -p $NPM_CONFIG_PREFIX/lib && npm install -g npm@8.5.3

# Configure mono
ENV PATH=/root/mono/bin:$PATH
Expand Down
2 changes: 1 addition & 1 deletion nodejs/next-js/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUN apt-get update && apt-get install -y postgresql-client ruby
# Update npm
ENV NPM_CONFIG_PREFIX=/home/node/.npm-global
ENV PATH=/home/node/.npm-global/bin:$PATH
RUN mkdir -p $NPM_CONFIG_PREFIX/lib && npm install -g npm
RUN mkdir -p $NPM_CONFIG_PREFIX/lib && npm install -g npm@8.5.3

# Configure mono
ENV PATH=/root/mono/bin:$PATH
Expand Down

0 comments on commit 1c9a98b

Please sign in to comment.