No patch files found in docker
The command runs but says no patch file found. Any workround ?
Dockerfile
# build stage
FROM node:lts-alpine as build-stage
WORKDIR /app
COPY package*.json patches ./
RUN npm install --unsafe-perm
COPY . .
RUN npm run build
# production stage
FROM nginx:stable-alpine as production-stage
COPY ./nginx/nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build-stage /app/dist /usr/share/nginx/html
# EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
Docker compose logs
Step 1/10 : FROM node:lts-alpine as build-stage
---> 710c8aa630d5
Step 2/10 : WORKDIR /app
---> Running in fb0b317f7086
---> 96e6a3fa9102
Step 3/10 : COPY package*.json patches ./
---> 6ec01f4331d9
Step 4/10 : RUN npm install --unsafe-perm
---> Running in 4388874e0da1
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
> [email protected] postinstall
> patch-package
patch-package 6.4.7
Applying patches...
No patch files found
Same thing is happening to me, Dockerfile:
FROM node:14.16-alpine
# Create and change to the app directory.
WORKDIR /usr/src/app
# Copy application dependency manifests to the container image.
# A wildcard is used to ensure both package.json AND yarn.lock are copied.
# Copying this separately prevents re-running npm install on every code change.
COPY .npmrc ./
COPY .yarnrc ./
COPY package.json ./
COPY yarn.lock ./
COPY patches .
# Install production dependencies.
RUN yarn
# Copy local code to the container image.
COPY . ./
RUN yarn build
ENV NODE_ENV production
# Run the web service on container startup.
CMD [ "npm", "start" ]
Do we have any update? I'm facing same issue "No patch files found"
Do we have any update? I'm facing same issue "No patch files found"
Found the fix. You will have to copy the patches directory like below: COPY patches ./patches
I got this as well and wonder if it shouldn't fail but instead treat it as no patches? I've had it when sharing Docker files between projects where there are none and I end up creating a .gitkeep file inside patches folder just to satisfy it