Skip to content

Commit

Permalink
Fix "‘node’: No such file or directory" error (#50)
Browse files Browse the repository at this point in the history
This error has occurred in the past, and I thought had been fixed, but it
occurred recently on my new macbook m1 so this is another attempt to fix it. My
guess is that something wrong was happening with the Docker multistage build.
The easiest way to avoid this is to not use a multistage build and instead
install node from nodesource. Hopefully, this resolves this error.
  • Loading branch information
Nick Ray authored Jun 24, 2022
1 parent 298c928 commit e26d305
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Dockerfile.mediawiki
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
FROM node:16.15.0-buster AS node
FROM docker-registry.wikimedia.org/dev/buster-php72-fpm:2.0.0-s1

COPY --from=node /usr/local/lib/node_modules /usr/local/lib/node_modules
COPY --from=node /usr/local/bin/node /usr/local/bin/node
RUN ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash - \
&& apt-get install -y nodejs

COPY src /src
COPY repositories.json /repositories.json
Expand Down

0 comments on commit e26d305

Please sign in to comment.