Closed andershagbard closed 7 months ago
aye aye aye. Since @shopify/theme-check-action@v2
, we're not doing docker builds anymore. In setup.ts, we do a pretty basic npm install
.
Your error message is related to problems with root-owned files being in there. Without more context I can't tell why that would be a problem. Maybe your self-hosted runner needs to setup a different cache folder? Are you using @actions/setup-node@v4
?
We are using setup-node@v4
with pnpm cache.
uses: actions/setup-node@v4
with:
cache: 'pnpm'
Our runner is Dockerfile looks like this:
FROM summerwind/actions-runner:latest
USER root
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash -
RUN apt-get install -y nodejs
RUN npm install --global yarn
RUN npm install --global pnpm
USER runner
It installs node 20 on root, and installs yarn and pnpm globally.
That's probably where the problem lies. npm install --global yarn
as root will populate your global folder with root-owned files. This runner (theme-check-action
) then tries to npm install @shopify/cli @shopify/theme
, but not as root and throws a EACCESS error (Permission denied).
Looks like a chown
or changing the user that installs npm/yarn to be non-root would solve your problem.
We are trying to set up this function on a self-hosted runner. Not sure if this issue is on our end, or an issue with your action.